home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 83 / MacAddict_083_2003-07.iso / mac / Software / Development / VLC Source 0.5.3.dmg / aclocal.m4 < prev    next >
Text File  |  2003-04-08  |  108KB  |  2,827 lines

  1. # generated automatically by aclocal 1.7.2 -*- Autoconf -*-
  2.  
  3. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
  4. # Free Software Foundation, Inc.
  5. # This file is free software; the Free Software Foundation
  6. # gives unlimited permission to copy and/or distribute it,
  7. # with or without modifications, as long as this notice is preserved.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  11. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  12. # PARTICULAR PURPOSE.
  13.  
  14. # Do all the work for Automake.                            -*- Autoconf -*-
  15.  
  16. # This macro actually does too much some checks are only needed if
  17. # your package does certain things.  But this isn't really a big deal.
  18.  
  19. # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
  20. # Free Software Foundation, Inc.
  21.  
  22. # This program is free software; you can redistribute it and/or modify
  23. # it under the terms of the GNU General Public License as published by
  24. # the Free Software Foundation; either version 2, or (at your option)
  25. # any later version.
  26.  
  27. # This program is distributed in the hope that it will be useful,
  28. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  29. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  30. # GNU General Public License for more details.
  31.  
  32. # You should have received a copy of the GNU General Public License
  33. # along with this program; if not, write to the Free Software
  34. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  35. # 02111-1307, USA.
  36.  
  37. # serial 8
  38.  
  39. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  40. # written in clear, in which case automake, when reading aclocal.m4,
  41. # will think it sees a *use*, and therefore will trigger all it's
  42. # C support machinery.  Also note that it means that autoscan, seeing
  43. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  44.  
  45.  
  46. AC_PREREQ([2.54])
  47.  
  48. # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
  49. # the ones we care about.
  50. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  51.  
  52. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  53. # AM_INIT_AUTOMAKE([OPTIONS])
  54. # -----------------------------------------------
  55. # The call with PACKAGE and VERSION arguments is the old style
  56. # call (pre autoconf-2.50), which is being phased out.  PACKAGE
  57. # and VERSION should now be passed to AC_INIT and removed from
  58. # the call to AM_INIT_AUTOMAKE.
  59. # We support both call styles for the transition.  After
  60. # the next Automake release, Autoconf can make the AC_INIT
  61. # arguments mandatory, and then we can depend on a new Autoconf
  62. # release and drop the old call support.
  63. AC_DEFUN([AM_INIT_AUTOMAKE],
  64. [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  65.  AC_REQUIRE([AC_PROG_INSTALL])dnl
  66. # test to see if srcdir already configured
  67. if test "`cd $srcdir && pwd`" != "`pwd`" &&
  68.    test -f $srcdir/config.status; then
  69.   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  70. fi
  71.  
  72. # test whether we have cygpath
  73. if test -z "$CYGPATH_W"; then
  74.   if (cygpath --version) >/dev/null 2>/dev/null; then
  75.     CYGPATH_W='cygpath -w'
  76.   else
  77.     CYGPATH_W=echo
  78.   fi
  79. fi
  80. AC_SUBST([CYGPATH_W])
  81.  
  82. # Define the identity of the package.
  83. dnl Distinguish between old-style and new-style calls.
  84. m4_ifval([$2],
  85. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  86.  AC_SUBST([PACKAGE], [$1])dnl
  87.  AC_SUBST([VERSION], [$2])],
  88. [_AM_SET_OPTIONS([$1])dnl
  89.  AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
  90.  AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
  91.  
  92. _AM_IF_OPTION([no-define],,
  93. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  94.  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  95.  
  96. # Some tools Automake needs.
  97. AC_REQUIRE([AM_SANITY_CHECK])dnl
  98. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  99. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  100. AM_MISSING_PROG(AUTOCONF, autoconf)
  101. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  102. AM_MISSING_PROG(AUTOHEADER, autoheader)
  103. AM_MISSING_PROG(MAKEINFO, makeinfo)
  104. AM_MISSING_PROG(AMTAR, tar)
  105. AM_PROG_INSTALL_SH
  106. AM_PROG_INSTALL_STRIP
  107. # We need awk for the "check" target.  The system "awk" is bad on
  108. # some platforms.
  109. AC_REQUIRE([AC_PROG_AWK])dnl
  110. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  111.  
  112. _AM_IF_OPTION([no-dependencies],,
  113. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  114.                   [_AM_DEPENDENCIES(CC)],
  115.                   [define([AC_PROG_CC],
  116.                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  117. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  118.                   [_AM_DEPENDENCIES(CXX)],
  119.                   [define([AC_PROG_CXX],
  120.                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  121. ])
  122. ])
  123.  
  124.  
  125. # When config.status generates a header, we must update the stamp-h file.
  126. # This file resides in the same directory as the config header
  127. # that is generated.  The stamp files are numbered to have different names.
  128.  
  129. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  130. # loop where config.status creates the headers, so we can generate
  131. # our stamp files there.
  132. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  133. [_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
  134. echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  135.  
  136. # Copyright 2002  Free Software Foundation, Inc.
  137.  
  138. # This program is free software; you can redistribute it and/or modify
  139. # it under the terms of the GNU General Public License as published by
  140. # the Free Software Foundation; either version 2, or (at your option)
  141. # any later version.
  142.  
  143. # This program is distributed in the hope that it will be useful,
  144. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  145. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  146. # GNU General Public License for more details.
  147.  
  148. # You should have received a copy of the GNU General Public License
  149. # along with this program; if not, write to the Free Software
  150. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  151.  
  152. # AM_AUTOMAKE_VERSION(VERSION)
  153. # ----------------------------
  154. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  155. # generated from the m4 files accompanying Automake X.Y.
  156. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
  157.  
  158. # AM_SET_CURRENT_AUTOMAKE_VERSION
  159. # -------------------------------
  160. # Call AM_AUTOMAKE_VERSION so it can be traced.
  161. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  162. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  163.      [AM_AUTOMAKE_VERSION([1.7.2])])
  164.  
  165. # Helper functions for option handling.                    -*- Autoconf -*-
  166.  
  167. # Copyright 2001, 2002  Free Software Foundation, Inc.
  168.  
  169. # This program is free software; you can redistribute it and/or modify
  170. # it under the terms of the GNU General Public License as published by
  171. # the Free Software Foundation; either version 2, or (at your option)
  172. # any later version.
  173.  
  174. # This program is distributed in the hope that it will be useful,
  175. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  176. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  177. # GNU General Public License for more details.
  178.  
  179. # You should have received a copy of the GNU General Public License
  180. # along with this program; if not, write to the Free Software
  181. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  182. # 02111-1307, USA.
  183.  
  184. # serial 2
  185.  
  186. # _AM_MANGLE_OPTION(NAME)
  187. # -----------------------
  188. AC_DEFUN([_AM_MANGLE_OPTION],
  189. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  190.  
  191. # _AM_SET_OPTION(NAME)
  192. # ------------------------------
  193. # Set option NAME.  Presently that only means defining a flag for this option.
  194. AC_DEFUN([_AM_SET_OPTION],
  195. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  196.  
  197. # _AM_SET_OPTIONS(OPTIONS)
  198. # ----------------------------------
  199. # OPTIONS is a space-separated list of Automake options.
  200. AC_DEFUN([_AM_SET_OPTIONS],
  201. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  202.  
  203. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  204. # -------------------------------------------
  205. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  206. AC_DEFUN([_AM_IF_OPTION],
  207. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  208.  
  209. #
  210. # Check to make sure that the build environment is sane.
  211. #
  212.  
  213. # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
  214.  
  215. # This program is free software; you can redistribute it and/or modify
  216. # it under the terms of the GNU General Public License as published by
  217. # the Free Software Foundation; either version 2, or (at your option)
  218. # any later version.
  219.  
  220. # This program is distributed in the hope that it will be useful,
  221. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  222. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  223. # GNU General Public License for more details.
  224.  
  225. # You should have received a copy of the GNU General Public License
  226. # along with this program; if not, write to the Free Software
  227. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  228. # 02111-1307, USA.
  229.  
  230. # serial 3
  231.  
  232. # AM_SANITY_CHECK
  233. # ---------------
  234. AC_DEFUN([AM_SANITY_CHECK],
  235. [AC_MSG_CHECKING([whether build environment is sane])
  236. # Just in case
  237. sleep 1
  238. echo timestamp > conftest.file
  239. # Do `set' in a subshell so we don't clobber the current shell's
  240. # arguments.  Must try -L first in case configure is actually a
  241. # symlink; some systems play weird games with the mod time of symlinks
  242. # (eg FreeBSD returns the mod time of the symlink's containing
  243. # directory).
  244. if (
  245.    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  246.    if test "$[*]" = "X"; then
  247.       # -L didn't work.
  248.       set X `ls -t $srcdir/configure conftest.file`
  249.    fi
  250.    rm -f conftest.file
  251.    if test "$[*]" != "X $srcdir/configure conftest.file" \
  252.       && test "$[*]" != "X conftest.file $srcdir/configure"; then
  253.  
  254.       # If neither matched, then we have a broken ls.  This can happen
  255.       # if, for instance, CONFIG_SHELL is bash and it inherits a
  256.       # broken ls alias from the environment.  This has actually
  257.       # happened.  Such a system could not be considered "sane".
  258.       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
  259. alias in your environment])
  260.    fi
  261.  
  262.    test "$[2]" = conftest.file
  263.    )
  264. then
  265.    # Ok.
  266.    :
  267. else
  268.    AC_MSG_ERROR([newly created file is older than distributed files!
  269. Check your system clock])
  270. fi
  271. AC_MSG_RESULT(yes)])
  272.  
  273. #  -*- Autoconf -*-
  274.  
  275.  
  276. # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
  277.  
  278. # This program is free software; you can redistribute it and/or modify
  279. # it under the terms of the GNU General Public License as published by
  280. # the Free Software Foundation; either version 2, or (at your option)
  281. # any later version.
  282.  
  283. # This program is distributed in the hope that it will be useful,
  284. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  285. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  286. # GNU General Public License for more details.
  287.  
  288. # You should have received a copy of the GNU General Public License
  289. # along with this program; if not, write to the Free Software
  290. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  291. # 02111-1307, USA.
  292.  
  293. # serial 3
  294.  
  295. # AM_MISSING_PROG(NAME, PROGRAM)
  296. # ------------------------------
  297. AC_DEFUN([AM_MISSING_PROG],
  298. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  299. $1=${$1-"${am_missing_run}$2"}
  300. AC_SUBST($1)])
  301.  
  302.  
  303. # AM_MISSING_HAS_RUN
  304. # ------------------
  305. # Define MISSING if not defined so far and test if it supports --run.
  306. # If it does, set am_missing_run to use it, otherwise, to nothing.
  307. AC_DEFUN([AM_MISSING_HAS_RUN],
  308. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  309. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  310. # Use eval to expand $SHELL
  311. if eval "$MISSING --run true"; then
  312.   am_missing_run="$MISSING --run "
  313. else
  314.   am_missing_run=
  315.   AC_MSG_WARN([`missing' script is too old or missing])
  316. fi
  317. ])
  318.  
  319. # AM_AUX_DIR_EXPAND
  320.  
  321. # Copyright 2001 Free Software Foundation, Inc.
  322.  
  323. # This program is free software; you can redistribute it and/or modify
  324. # it under the terms of the GNU General Public License as published by
  325. # the Free Software Foundation; either version 2, or (at your option)
  326. # any later version.
  327.  
  328. # This program is distributed in the hope that it will be useful,
  329. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  330. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  331. # GNU General Public License for more details.
  332.  
  333. # You should have received a copy of the GNU General Public License
  334. # along with this program; if not, write to the Free Software
  335. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  336. # 02111-1307, USA.
  337.  
  338. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  339. # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
  340. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  341. #
  342. # Of course, Automake must honor this variable whenever it calls a
  343. # tool from the auxiliary directory.  The problem is that $srcdir (and
  344. # therefore $ac_aux_dir as well) can be either absolute or relative,
  345. # depending on how configure is run.  This is pretty annoying, since
  346. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  347. # source directory, any form will work fine, but in subdirectories a
  348. # relative path needs to be adjusted first.
  349. #
  350. # $ac_aux_dir/missing
  351. #    fails when called from a subdirectory if $ac_aux_dir is relative
  352. # $top_srcdir/$ac_aux_dir/missing
  353. #    fails if $ac_aux_dir is absolute,
  354. #    fails when called from a subdirectory in a VPATH build with
  355. #          a relative $ac_aux_dir
  356. #
  357. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  358. # are both prefixed by $srcdir.  In an in-source build this is usually
  359. # harmless because $srcdir is `.', but things will broke when you
  360. # start a VPATH build or use an absolute $srcdir.
  361. #
  362. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  363. # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
  364. #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  365. # and then we would define $MISSING as
  366. #   MISSING="\${SHELL} $am_aux_dir/missing"
  367. # This will work as long as MISSING is not called from configure, because
  368. # unfortunately $(top_srcdir) has no meaning in configure.
  369. # However there are other variables, like CC, which are often used in
  370. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  371. #
  372. # Another solution, used here, is to always expand $ac_aux_dir to an
  373. # absolute PATH.  The drawback is that using absolute paths prevent a
  374. # configured tree to be moved without reconfiguration.
  375.  
  376. # Rely on autoconf to set up CDPATH properly.
  377. AC_PREREQ([2.50])
  378.  
  379. AC_DEFUN([AM_AUX_DIR_EXPAND], [
  380. # expand $ac_aux_dir to an absolute path
  381. am_aux_dir=`cd $ac_aux_dir && pwd`
  382. ])
  383.  
  384. # AM_PROG_INSTALL_SH
  385. # ------------------
  386. # Define $install_sh.
  387.  
  388. # Copyright 2001 Free Software Foundation, Inc.
  389.  
  390. # This program is free software; you can redistribute it and/or modify
  391. # it under the terms of the GNU General Public License as published by
  392. # the Free Software Foundation; either version 2, or (at your option)
  393. # any later version.
  394.  
  395. # This program is distributed in the hope that it will be useful,
  396. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  397. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  398. # GNU General Public License for more details.
  399.  
  400. # You should have received a copy of the GNU General Public License
  401. # along with this program; if not, write to the Free Software
  402. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  403. # 02111-1307, USA.
  404.  
  405. AC_DEFUN([AM_PROG_INSTALL_SH],
  406. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  407. install_sh=${install_sh-"$am_aux_dir/install-sh"}
  408. AC_SUBST(install_sh)])
  409.  
  410. # AM_PROG_INSTALL_STRIP
  411.  
  412. # Copyright 2001 Free Software Foundation, Inc.
  413.  
  414. # This program is free software; you can redistribute it and/or modify
  415. # it under the terms of the GNU General Public License as published by
  416. # the Free Software Foundation; either version 2, or (at your option)
  417. # any later version.
  418.  
  419. # This program is distributed in the hope that it will be useful,
  420. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  421. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  422. # GNU General Public License for more details.
  423.  
  424. # You should have received a copy of the GNU General Public License
  425. # along with this program; if not, write to the Free Software
  426. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  427. # 02111-1307, USA.
  428.  
  429. # One issue with vendor `install' (even GNU) is that you can't
  430. # specify the program used to strip binaries.  This is especially
  431. # annoying in cross-compiling environments, where the build's strip
  432. # is unlikely to handle the host's binaries.
  433. # Fortunately install-sh will honor a STRIPPROG variable, so we
  434. # always use install-sh in `make install-strip', and initialize
  435. # STRIPPROG with the value of the STRIP variable (set by the user).
  436. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  437. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  438. # Installed binaries are usually stripped using `strip' when the user
  439. # run `make install-strip'.  However `strip' might not be the right
  440. # tool to use in cross-compilation environments, therefore Automake
  441. # will honor the `STRIP' environment variable to overrule this program.
  442. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  443. if test "$cross_compiling" != no; then
  444.   AC_CHECK_TOOL([STRIP], [strip], :)
  445. fi
  446. INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  447. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  448.  
  449. # serial 4                        -*- Autoconf -*-
  450.  
  451. # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
  452.  
  453. # This program is free software; you can redistribute it and/or modify
  454. # it under the terms of the GNU General Public License as published by
  455. # the Free Software Foundation; either version 2, or (at your option)
  456. # any later version.
  457.  
  458. # This program is distributed in the hope that it will be useful,
  459. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  460. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  461. # GNU General Public License for more details.
  462.  
  463. # You should have received a copy of the GNU General Public License
  464. # along with this program; if not, write to the Free Software
  465. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  466. # 02111-1307, USA.
  467.  
  468.  
  469. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  470. # written in clear, in which case automake, when reading aclocal.m4,
  471. # will think it sees a *use*, and therefore will trigger all it's
  472. # C support machinery.  Also note that it means that autoscan, seeing
  473. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  474.  
  475.  
  476.  
  477. # _AM_DEPENDENCIES(NAME)
  478. # ----------------------
  479. # See how the compiler implements dependency checking.
  480. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  481. # We try a few techniques and use that to set a single cache variable.
  482. #
  483. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  484. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  485. # dependency, and given that the user is not expected to run this macro,
  486. # just rely on AC_PROG_CC.
  487. AC_DEFUN([_AM_DEPENDENCIES],
  488. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  489. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  490. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  491. AC_REQUIRE([AM_DEP_TRACK])dnl
  492.  
  493. ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
  494.        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
  495.        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  496.        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
  497.                    [depcc="$$1"   am_compiler_list=])
  498.  
  499. AC_CACHE_CHECK([dependency style of $depcc],
  500.                [am_cv_$1_dependencies_compiler_type],
  501. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  502.   # We make a subdir and do the tests there.  Otherwise we can end up
  503.   # making bogus files that we don't know about and never remove.  For
  504.   # instance it was reported that on HP-UX the gcc test will end up
  505.   # making a dummy file named `D' -- because `-MD' means `put the output
  506.   # in D'.
  507.   mkdir conftest.dir
  508.   # Copy depcomp to subdir because otherwise we won't find it if we're
  509.   # using a relative directory.
  510.   cp "$am_depcomp" conftest.dir
  511.   cd conftest.dir
  512.  
  513.   am_cv_$1_dependencies_compiler_type=none
  514.   if test "$am_compiler_list" = ""; then
  515.      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  516.   fi
  517.   for depmode in $am_compiler_list; do
  518.     # We need to recreate these files for each test, as the compiler may
  519.     # overwrite some of them when testing with obscure command lines.
  520.     # This happens at least with the AIX C compiler.
  521.     echo '#include "conftest.h"' > conftest.c
  522.     echo 'int i;' > conftest.h
  523.     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
  524.  
  525.     case $depmode in
  526.     nosideeffect)
  527.       # after this tag, mechanisms are not by side-effect, so they'll
  528.       # only be used when explicitly requested
  529.       if test "x$enable_dependency_tracking" = xyes; then
  530.     continue
  531.       else
  532.     break
  533.       fi
  534.       ;;
  535.     none) break ;;
  536.     esac
  537.     # We check with `-c' and `-o' for the sake of the "dashmstdout"
  538.     # mode.  It turns out that the SunPro C++ compiler does not properly
  539.     # handle `-M -o', and we need to detect this.
  540.     if depmode=$depmode \
  541.        source=conftest.c object=conftest.o \
  542.        depfile=conftest.Po tmpdepfile=conftest.TPo \
  543.        $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
  544.        grep conftest.h conftest.Po > /dev/null 2>&1 &&
  545.        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  546.       am_cv_$1_dependencies_compiler_type=$depmode
  547.       break
  548.     fi
  549.   done
  550.  
  551.   cd ..
  552.   rm -rf conftest.dir
  553. else
  554.   am_cv_$1_dependencies_compiler_type=none
  555. fi
  556. ])
  557. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  558. AM_CONDITIONAL([am__fastdep$1], [
  559.   test "x$enable_dependency_tracking" != xno \
  560.   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  561. ])
  562.  
  563.  
  564. # AM_SET_DEPDIR
  565. # -------------
  566. # Choose a directory name for dependency files.
  567. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  568. AC_DEFUN([AM_SET_DEPDIR],
  569. [rm -f .deps 2>/dev/null
  570. mkdir .deps 2>/dev/null
  571. if test -d .deps; then
  572.   DEPDIR=.deps
  573. else
  574.   # MS-DOS does not allow filenames that begin with a dot.
  575.   DEPDIR=_deps
  576. fi
  577. rmdir .deps 2>/dev/null
  578. AC_SUBST([DEPDIR])
  579. ])
  580.  
  581.  
  582. # AM_DEP_TRACK
  583. # ------------
  584. AC_DEFUN([AM_DEP_TRACK],
  585. [AC_ARG_ENABLE(dependency-tracking,
  586. [  --disable-dependency-tracking Speeds up one-time builds
  587.   --enable-dependency-tracking  Do not reject slow dependency extractors])
  588. if test "x$enable_dependency_tracking" != xno; then
  589.   am_depcomp="$ac_aux_dir/depcomp"
  590.   AMDEPBACKSLASH='\'
  591. fi
  592. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  593. AC_SUBST([AMDEPBACKSLASH])
  594. ])
  595.  
  596. # Generate code to set up dependency tracking.   -*- Autoconf -*-
  597.  
  598. # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  599.  
  600. # This program is free software; you can redistribute it and/or modify
  601. # it under the terms of the GNU General Public License as published by
  602. # the Free Software Foundation; either version 2, or (at your option)
  603. # any later version.
  604.  
  605. # This program is distributed in the hope that it will be useful,
  606. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  607. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  608. # GNU General Public License for more details.
  609.  
  610. # You should have received a copy of the GNU General Public License
  611. # along with this program; if not, write to the Free Software
  612. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  613. # 02111-1307, USA.
  614.  
  615. #serial 2
  616.  
  617. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  618. # ------------------------------
  619. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  620. [for mf in $CONFIG_FILES; do
  621.   # Strip MF so we end up with the name of the file.
  622.   mf=`echo "$mf" | sed -e 's/:.*$//'`
  623.   # Check whether this is an Automake generated Makefile or not.
  624.   # We used to match only the files named `Makefile.in', but
  625.   # some people rename them; so instead we look at the file content.
  626.   # Grep'ing the first line is not enough: some people post-process
  627.   # each Makefile.in and add a new line on top of each file to say so.
  628.   # So let's grep whole file.
  629.   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
  630.     dirpart=`AS_DIRNAME("$mf")`
  631.   else
  632.     continue
  633.   fi
  634.   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
  635.   # Extract the definition of DEP_FILES from the Makefile without
  636.   # running `make'.
  637.   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
  638.   test -z "$DEPDIR" && continue
  639.   # When using ansi2knr, U may be empty or an underscore; expand it
  640.   U=`sed -n -e '/^U = / s///p' < "$mf"`
  641.   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
  642.   # We invoke sed twice because it is the simplest approach to
  643.   # changing $(DEPDIR) to its actual value in the expansion.
  644.   for file in `sed -n -e '
  645.     /^DEP_FILES = .*\\\\$/ {
  646.       s/^DEP_FILES = //
  647.       :loop
  648.     s/\\\\$//
  649.     p
  650.     n
  651.     /\\\\$/ b loop
  652.       p
  653.     }
  654.     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
  655.        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  656.     # Make sure the directory exists.
  657.     test -f "$dirpart/$file" && continue
  658.     fdir=`AS_DIRNAME(["$file"])`
  659.     AS_MKDIR_P([$dirpart/$fdir])
  660.     # echo "creating $dirpart/$file"
  661.     echo '# dummy' > "$dirpart/$file"
  662.   done
  663. done
  664. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  665.  
  666.  
  667. # AM_OUTPUT_DEPENDENCY_COMMANDS
  668. # -----------------------------
  669. # This macro should only be invoked once -- use via AC_REQUIRE.
  670. #
  671. # This code is only required when automatic dependency tracking
  672. # is enabled.  FIXME.  This creates each `.P' file that we will
  673. # need in order to bootstrap the dependency handling code.
  674. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  675. [AC_CONFIG_COMMANDS([depfiles],
  676.      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  677.      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  678. ])
  679.  
  680. # Check to see how 'make' treats includes.    -*- Autoconf -*-
  681.  
  682. # Copyright (C) 2001, 2002 Free Software Foundation, Inc.
  683.  
  684. # This program is free software; you can redistribute it and/or modify
  685. # it under the terms of the GNU General Public License as published by
  686. # the Free Software Foundation; either version 2, or (at your option)
  687. # any later version.
  688.  
  689. # This program is distributed in the hope that it will be useful,
  690. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  691. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  692. # GNU General Public License for more details.
  693.  
  694. # You should have received a copy of the GNU General Public License
  695. # along with this program; if not, write to the Free Software
  696. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  697. # 02111-1307, USA.
  698.  
  699. # serial 2
  700.  
  701. # AM_MAKE_INCLUDE()
  702. # -----------------
  703. # Check to see how make treats includes.
  704. AC_DEFUN([AM_MAKE_INCLUDE],
  705. [am_make=${MAKE-make}
  706. cat > confinc << 'END'
  707. doit:
  708.     @echo done
  709. END
  710. # If we don't find an include directive, just comment out the code.
  711. AC_MSG_CHECKING([for style of include used by $am_make])
  712. am__include="#"
  713. am__quote=
  714. _am_result=none
  715. # First try GNU make style include.
  716. echo "include confinc" > confmf
  717. # We grep out `Entering directory' and `Leaving directory'
  718. # messages which can occur if `w' ends up in MAKEFLAGS.
  719. # In particular we don't look at `^make:' because GNU make might
  720. # be invoked under some other name (usually "gmake"), in which
  721. # case it prints its new name instead of `make'.
  722. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  723.    am__include=include
  724.    am__quote=
  725.    _am_result=GNU
  726. fi
  727. # Now try BSD make style include.
  728. if test "$am__include" = "#"; then
  729.    echo '.include "confinc"' > confmf
  730.    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  731.       am__include=.include
  732.       am__quote="\""
  733.       _am_result=BSD
  734.    fi
  735. fi
  736. AC_SUBST(am__include)
  737. AC_SUBST(am__quote)
  738. AC_MSG_RESULT($_am_result)
  739. rm -f confinc confmf
  740. ])
  741.  
  742. # AM_CONDITIONAL                                              -*- Autoconf -*-
  743.  
  744. # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
  745.  
  746. # This program is free software; you can redistribute it and/or modify
  747. # it under the terms of the GNU General Public License as published by
  748. # the Free Software Foundation; either version 2, or (at your option)
  749. # any later version.
  750.  
  751. # This program is distributed in the hope that it will be useful,
  752. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  753. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  754. # GNU General Public License for more details.
  755.  
  756. # You should have received a copy of the GNU General Public License
  757. # along with this program; if not, write to the Free Software
  758. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  759. # 02111-1307, USA.
  760.  
  761. # serial 5
  762.  
  763. AC_PREREQ(2.52)
  764.  
  765. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  766. # -------------------------------------
  767. # Define a conditional.
  768. AC_DEFUN([AM_CONDITIONAL],
  769. [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
  770.         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  771. AC_SUBST([$1_TRUE])
  772. AC_SUBST([$1_FALSE])
  773. if $2; then
  774.   $1_TRUE=
  775.   $1_FALSE='#'
  776. else
  777.   $1_TRUE='#'
  778.   $1_FALSE=
  779. fi
  780. AC_CONFIG_COMMANDS_PRE(
  781. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  782.   AC_MSG_ERROR([conditional "$1" was never defined.
  783. Usually this means the macro was only invoked conditionally.])
  784. fi])])
  785.  
  786. # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
  787.  
  788. # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
  789.  
  790. # This program is free software; you can redistribute it and/or modify
  791. # it under the terms of the GNU General Public License as published by
  792. # the Free Software Foundation; either version 2, or (at your option)
  793. # any later version.
  794.  
  795. # This program is distributed in the hope that it will be useful,
  796. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  797. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  798. # GNU General Public License for more details.
  799.  
  800. # You should have received a copy of the GNU General Public License
  801. # along with this program; if not, write to the Free Software
  802. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  803. # 02111-1307, USA.
  804.  
  805. AC_PREREQ([2.52])
  806.  
  807. # serial 6
  808.  
  809. # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
  810. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  811.  
  812. # serial 2
  813.  
  814. # AM_PROG_CC_C_O
  815. # --------------
  816. # Like AC_PROG_CC_C_O, but changed for automake.
  817.  
  818. # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
  819.  
  820. # This program is free software; you can redistribute it and/or modify
  821. # it under the terms of the GNU General Public License as published by
  822. # the Free Software Foundation; either version 2, or (at your option)
  823. # any later version.
  824.  
  825. # This program is distributed in the hope that it will be useful,
  826. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  827. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  828. # GNU General Public License for more details.
  829.  
  830. # You should have received a copy of the GNU General Public License
  831. # along with this program; if not, write to the Free Software
  832. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  833. # 02111-1307, USA.
  834.  
  835. AC_DEFUN([AM_PROG_CC_C_O],
  836. [AC_REQUIRE([AC_PROG_CC_C_O])dnl
  837. AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  838. # FIXME: we rely on the cache variable name because
  839. # there is no other way.
  840. set dummy $CC
  841. ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
  842. if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
  843.    # Losing compiler, so override with the script.
  844.    # FIXME: It is wrong to rewrite CC.
  845.    # But if we don't then we get into trouble of one sort or another.
  846.    # A longer-term fix would be to have automake use am__CC in this case,
  847.    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  848.    CC="$am_aux_dir/compile $CC"
  849. fi
  850. ])
  851.  
  852. # gettext.m4 serial 17 (gettext-0.11.5)
  853. dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
  854. dnl This file is free software, distributed under the terms of the GNU
  855. dnl General Public License.  As a special exception to the GNU General
  856. dnl Public License, this file may be distributed as part of a program
  857. dnl that contains a configuration script generated by Autoconf, under
  858. dnl the same distribution terms as the rest of that program.
  859. dnl
  860. dnl This file can can be used in projects which are not available under
  861. dnl the GNU General Public License or the GNU Library General Public
  862. dnl License but which still want to provide support for the GNU gettext
  863. dnl functionality.
  864. dnl Please note that the actual code of the GNU gettext library is covered
  865. dnl by the GNU Library General Public License, and the rest of the GNU
  866. dnl gettext package package is covered by the GNU General Public License.
  867. dnl They are *not* in the public domain.
  868.  
  869. dnl Authors:
  870. dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
  871. dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2002.
  872.  
  873. dnl Macro to add for using GNU gettext.
  874.  
  875. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
  876. dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
  877. dnl    default (if it is not specified or empty) is 'no-libtool'.
  878. dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
  879. dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
  880. dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
  881. dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
  882. dnl    depending on --{enable,disable}-{shared,static} and on the presence of
  883. dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
  884. dnl    $(top_builddir)/intl/libintl.a will be created.
  885. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
  886. dnl    implementations (in libc or libintl) without the ngettext() function
  887. dnl    will be ignored.  If NEEDSYMBOL is specified and is
  888. dnl    'need-formatstring-macros', then GNU gettext implementations that don't
  889. dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
  890. dnl INTLDIR is used to find the intl libraries.  If empty,
  891. dnl    the value `$(top_builddir)/intl/' is used.
  892. dnl
  893. dnl The result of the configuration is one of three cases:
  894. dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
  895. dnl    and used.
  896. dnl    Catalog format: GNU --> install in $(datadir)
  897. dnl    Catalog extension: .mo after installation, .gmo in source tree
  898. dnl 2) GNU gettext has been found in the system's C library.
  899. dnl    Catalog format: GNU --> install in $(datadir)
  900. dnl    Catalog extension: .mo after installation, .gmo in source tree
  901. dnl 3) No internationalization, always use English msgid.
  902. dnl    Catalog format: none
  903. dnl    Catalog extension: none
  904. dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
  905. dnl The use of .gmo is historical (it was needed to avoid overwriting the
  906. dnl GNU format catalogs when building on a platform with an X/Open gettext),
  907. dnl but we keep it in order not to force irrelevant filename changes on the
  908. dnl maintainers.
  909. dnl
  910. AC_DEFUN([AM_GNU_GETTEXT],
  911. [
  912.   dnl Argument checking.
  913.   ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
  914.     [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
  915. ])])])])])
  916.   ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
  917.     [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
  918. ])])])])
  919.   define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
  920.   define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
  921.  
  922.   AC_REQUIRE([AM_PO_SUBDIRS])dnl
  923.   ifelse(gt_included_intl, yes, [
  924.     AC_REQUIRE([AM_INTL_SUBDIR])dnl
  925.   ])
  926.  
  927.   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
  928.   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  929.   AC_REQUIRE([AC_LIB_RPATH])
  930.  
  931.   dnl Sometimes libintl requires libiconv, so first search for libiconv.
  932.   dnl Ideally we would do this search only after the
  933.   dnl      if test "$USE_NLS" = "yes"; then
  934.   dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
  935.   dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
  936.   dnl the configure script would need to contain the same shell code
  937.   dnl again, outside any 'if'. There are two solutions:
  938.   dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
  939.   dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
  940.   dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
  941.   dnl documented, we avoid it.
  942.   ifelse(gt_included_intl, yes, , [
  943.     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
  944.   ])
  945.  
  946.   AC_MSG_CHECKING([whether NLS is requested])
  947.   dnl Default is enabled NLS
  948.   AC_ARG_ENABLE(nls,
  949.     [  --disable-nls           do not use Native Language Support],
  950.     USE_NLS=$enableval, USE_NLS=yes)
  951.   AC_MSG_RESULT($USE_NLS)
  952.   AC_SUBST(USE_NLS)
  953.  
  954.   ifelse(gt_included_intl, yes, [
  955.     BUILD_INCLUDED_LIBINTL=no
  956.     USE_INCLUDED_LIBINTL=no
  957.   ])
  958.   LIBINTL=
  959.   LTLIBINTL=
  960.   POSUB=
  961.  
  962.   dnl If we use NLS figure out what method
  963.   if test "$USE_NLS" = "yes"; then
  964.     gt_use_preinstalled_gnugettext=no
  965.     ifelse(gt_included_intl, yes, [
  966.       AC_MSG_CHECKING([whether included gettext is requested])
  967.       AC_ARG_WITH(included-gettext,
  968.         [  --with-included-gettext use the GNU gettext library included here],
  969.         nls_cv_force_use_gnu_gettext=$withval,
  970.         nls_cv_force_use_gnu_gettext=no)
  971.       AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
  972.  
  973.       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
  974.       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
  975.     ])
  976.         dnl User does not insist on using GNU NLS library.  Figure out what
  977.         dnl to use.  If GNU gettext is available we use this.  Else we have
  978.         dnl to fall back to GNU NLS library.
  979.  
  980.         dnl Add a version number to the cache macros.
  981.         define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
  982.         define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
  983.         define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
  984.  
  985.         AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
  986.          [AC_TRY_LINK([#include <libintl.h>
  987. ]ifelse([$2], [need-formatstring-macros],
  988. [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  989. #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
  990. #endif
  991. changequote(,)dnl
  992. typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
  993. changequote([,])dnl
  994. ], [])[extern int _nl_msg_cat_cntr;
  995. extern int *_nl_domain_bindings;],
  996.             [bindtextdomain ("", "");
  997. return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
  998.             gt_cv_func_gnugettext_libc=yes,
  999.             gt_cv_func_gnugettext_libc=no)])
  1000.  
  1001.         if test "$gt_cv_func_gnugettext_libc" != "yes"; then
  1002.           dnl Sometimes libintl requires libiconv, so first search for libiconv.
  1003.           ifelse(gt_included_intl, yes, , [
  1004.             AM_ICONV_LINK
  1005.           ])
  1006.           dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
  1007.           dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
  1008.           dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
  1009.           dnl even if libiconv doesn't exist.
  1010.           AC_LIB_LINKFLAGS_BODY([intl])
  1011.           AC_CACHE_CHECK([for GNU gettext in libintl],
  1012.             gt_cv_func_gnugettext_libintl,
  1013.            [gt_save_CPPFLAGS="$CPPFLAGS"
  1014.             CPPFLAGS="$CPPFLAGS $INCINTL"
  1015.             gt_save_LIBS="$LIBS"
  1016.             LIBS="$LIBS $LIBINTL"
  1017.             dnl Now see whether libintl exists and does not depend on libiconv.
  1018.             AC_TRY_LINK([#include <libintl.h>
  1019. ]ifelse([$2], [need-formatstring-macros],
  1020. [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  1021. #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
  1022. #endif
  1023. changequote(,)dnl
  1024. typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
  1025. changequote([,])dnl
  1026. ], [])[extern int _nl_msg_cat_cntr;
  1027. extern
  1028. #ifdef __cplusplus
  1029. "C"
  1030. #endif
  1031. const char *_nl_expand_alias ();],
  1032.               [bindtextdomain ("", "");
  1033. return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
  1034.               gt_cv_func_gnugettext_libintl=yes,
  1035.               gt_cv_func_gnugettext_libintl=no)
  1036.             dnl Now see whether libintl exists and depends on libiconv.
  1037.             if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
  1038.               LIBS="$LIBS $LIBICONV"
  1039.               AC_TRY_LINK([#include <libintl.h>
  1040. ]ifelse([$2], [need-formatstring-macros],
  1041. [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  1042. #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
  1043. #endif
  1044. changequote(,)dnl
  1045. typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
  1046. changequote([,])dnl
  1047. ], [])[extern int _nl_msg_cat_cntr;
  1048. extern
  1049. #ifdef __cplusplus
  1050. "C"
  1051. #endif
  1052. const char *_nl_expand_alias ();],
  1053.                 [bindtextdomain ("", "");
  1054. return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
  1055.                [LIBINTL="$LIBINTL $LIBICONV"
  1056.                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
  1057.                 gt_cv_func_gnugettext_libintl=yes
  1058.                ])
  1059.             fi
  1060.             CPPFLAGS="$gt_save_CPPFLAGS"
  1061.             LIBS="$gt_save_LIBS"])
  1062.         fi
  1063.  
  1064.         dnl If an already present or preinstalled GNU gettext() is found,
  1065.         dnl use it.  But if this macro is used in GNU gettext, and GNU
  1066.         dnl gettext is already preinstalled in libintl, we update this
  1067.         dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
  1068.         if test "$gt_cv_func_gnugettext_libc" = "yes" \
  1069.            || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
  1070.                 && test "$PACKAGE" != gettext; }; then
  1071.           gt_use_preinstalled_gnugettext=yes
  1072.         else
  1073.           dnl Reset the values set by searching for libintl.
  1074.           LIBINTL=
  1075.           LTLIBINTL=
  1076.           INCINTL=
  1077.         fi
  1078.  
  1079.     ifelse(gt_included_intl, yes, [
  1080.         if test "$gt_use_preinstalled_gnugettext" != "yes"; then
  1081.           dnl GNU gettext is not found in the C library.
  1082.           dnl Fall back on included GNU gettext library.
  1083.           nls_cv_use_gnu_gettext=yes
  1084.         fi
  1085.       fi
  1086.  
  1087.       if test "$nls_cv_use_gnu_gettext" = "yes"; then
  1088.         dnl Mark actions used to generate GNU NLS library.
  1089.         INTLOBJS="\$(GETTOBJS)"
  1090.         BUILD_INCLUDED_LIBINTL=yes
  1091.         USE_INCLUDED_LIBINTL=yes
  1092.         LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
  1093.         LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
  1094.         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
  1095.       fi
  1096.  
  1097.       if test "$gt_use_preinstalled_gnugettext" = "yes" \
  1098.          || test "$nls_cv_use_gnu_gettext" = "yes"; then
  1099.         dnl Mark actions to use GNU gettext tools.
  1100.         CATOBJEXT=.gmo
  1101.       fi
  1102.     ])
  1103.  
  1104.     if test "$gt_use_preinstalled_gnugettext" = "yes" \
  1105.        || test "$nls_cv_use_gnu_gettext" = "yes"; then
  1106.       AC_DEFINE(ENABLE_NLS, 1,
  1107.         [Define to 1 if translation of program messages to the user's native language
  1108.    is requested.])
  1109.     else
  1110.       USE_NLS=no
  1111.     fi
  1112.   fi
  1113.  
  1114.   if test "$USE_NLS" = "yes"; then
  1115.  
  1116.     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
  1117.       if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
  1118.         AC_MSG_CHECKING([how to link with libintl])
  1119.         AC_MSG_RESULT([$LIBINTL])
  1120.         AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
  1121.       fi
  1122.  
  1123.       dnl For backward compatibility. Some packages may be using this.
  1124.       AC_DEFINE(HAVE_GETTEXT, 1,
  1125.        [Define if the GNU gettext() function is already present or preinstalled.])
  1126.       AC_DEFINE(HAVE_DCGETTEXT, 1,
  1127.        [Define if the GNU dcgettext() function is already present or preinstalled.])
  1128.     fi
  1129.  
  1130.     dnl We need to process the po/ directory.
  1131.     POSUB=po
  1132.   fi
  1133.  
  1134.   ifelse(gt_included_intl, yes, [
  1135.     dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
  1136.     dnl to 'yes' because some of the testsuite requires it.
  1137.     if test "$PACKAGE" = gettext; then
  1138.       BUILD_INCLUDED_LIBINTL=yes
  1139.     fi
  1140.  
  1141.     dnl Make all variables we use known to autoconf.
  1142.     AC_SUBST(BUILD_INCLUDED_LIBINTL)
  1143.     AC_SUBST(USE_INCLUDED_LIBINTL)
  1144.     AC_SUBST(CATOBJEXT)
  1145.     AC_SUBST(INTLOBJS)
  1146.  
  1147.     dnl For backward compatibility. Some configure.ins may be using this.
  1148.     nls_cv_header_intl=
  1149.     nls_cv_header_libgt=
  1150.  
  1151.     dnl For backward compatibility. Some Makefiles may be using this.
  1152.     DATADIRNAME=share
  1153.     AC_SUBST(DATADIRNAME)
  1154.  
  1155.     dnl For backward compatibility. Some Makefiles may be using this.
  1156.     INSTOBJEXT=.mo
  1157.     AC_SUBST(INSTOBJEXT)
  1158.  
  1159.     dnl For backward compatibility. Some Makefiles may be using this.
  1160.     GENCAT=gencat
  1161.     AC_SUBST(GENCAT)
  1162.  
  1163.     dnl Enable libtool support if the surrounding package wishes it.
  1164.     INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
  1165.     AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
  1166.   ])
  1167.  
  1168.   dnl For backward compatibility. Some Makefiles may be using this.
  1169.   INTLLIBS="$LIBINTL"
  1170.   AC_SUBST(INTLLIBS)
  1171.  
  1172.   dnl Make all documented variables known to autoconf.
  1173.   AC_SUBST(LIBINTL)
  1174.   AC_SUBST(LTLIBINTL)
  1175.   AC_SUBST(POSUB)
  1176. ])
  1177.  
  1178.  
  1179. dnl Checks for all prerequisites of the po subdirectory,
  1180. dnl except for USE_NLS.
  1181. AC_DEFUN([AM_PO_SUBDIRS],
  1182. [
  1183.   AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  1184.   AC_REQUIRE([AC_PROG_INSTALL])dnl
  1185.   AC_REQUIRE([AM_MKINSTALLDIRS])dnl
  1186.  
  1187.   dnl Perform the following tests also if --disable-nls has been given,
  1188.   dnl because they are needed for "make dist" to work.
  1189.  
  1190.   dnl Search for GNU msgfmt in the PATH.
  1191.   dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
  1192.   dnl The second test excludes FreeBSD msgfmt.
  1193.   AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
  1194.     [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
  1195.      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
  1196.     :)
  1197.   AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
  1198.  
  1199.   dnl Search for GNU xgettext 0.11 or newer in the PATH.
  1200.   dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
  1201.   dnl The second test excludes FreeBSD xgettext.
  1202.   AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
  1203.     [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
  1204.      (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
  1205.     :)
  1206.   dnl Remove leftover from FreeBSD xgettext call.
  1207.   rm -f messages.po
  1208.  
  1209.   dnl Search for GNU msgmerge 0.11 or newer in the PATH.
  1210.   AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
  1211.     [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
  1212.  
  1213.   dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
  1214.   dnl Test whether we really found GNU msgfmt.
  1215.   if test "$GMSGFMT" != ":"; then
  1216.     dnl If it is no GNU msgfmt we define it as : so that the
  1217.     dnl Makefiles still can work.
  1218.     if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
  1219.        (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
  1220.       : ;
  1221.     else
  1222.       GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
  1223.       AC_MSG_RESULT(
  1224.         [found $GMSGFMT program is not GNU msgfmt; ignore it])
  1225.       GMSGFMT=":"
  1226.     fi
  1227.   fi
  1228.  
  1229.   dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
  1230.   dnl Test whether we really found GNU xgettext.
  1231.   if test "$XGETTEXT" != ":"; then
  1232.     dnl If it is no GNU xgettext we define it as : so that the
  1233.     dnl Makefiles still can work.
  1234.     if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
  1235.        (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
  1236.       : ;
  1237.     else
  1238.       AC_MSG_RESULT(
  1239.         [found xgettext program is not GNU xgettext; ignore it])
  1240.       XGETTEXT=":"
  1241.     fi
  1242.     dnl Remove leftover from FreeBSD xgettext call.
  1243.     rm -f messages.po
  1244.   fi
  1245.  
  1246.   AC_OUTPUT_COMMANDS([
  1247.     for ac_file in $CONFIG_FILES; do
  1248.       # Support "outfile[:infile[:infile...]]"
  1249.       case "$ac_file" in
  1250.         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1251.       esac
  1252.       # PO directories have a Makefile.in generated from Makefile.in.in.
  1253.       case "$ac_file" in */Makefile.in)
  1254.         # Adjust a relative srcdir.
  1255.         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
  1256.         ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
  1257.         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
  1258.         # In autoconf-2.13 it is called $ac_given_srcdir.
  1259.         # In autoconf-2.50 it is called $srcdir.
  1260.         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
  1261.         case "$ac_given_srcdir" in
  1262.           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
  1263.           /*) top_srcdir="$ac_given_srcdir" ;;
  1264.           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1265.         esac
  1266.         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
  1267.           rm -f "$ac_dir/POTFILES"
  1268.           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
  1269.           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[     ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
  1270.           # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
  1271.           # on $ac_dir but don't depend on user-specified configuration
  1272.           # parameters.
  1273.           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
  1274.             # The LINGUAS file contains the set of available languages.
  1275.             if test -n "$ALL_LINGUAS"; then
  1276.               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
  1277.             fi
  1278.             ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
  1279.             # Hide the ALL_LINGUAS assigment from automake.
  1280.             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
  1281.           fi
  1282.           case "$ac_given_srcdir" in
  1283.             .) srcdirpre= ;;
  1284.             *) srcdirpre='$(srcdir)/' ;;
  1285.           esac
  1286.           POFILES=
  1287.           GMOFILES=
  1288.           UPDATEPOFILES=
  1289.           DUMMYPOFILES=
  1290.           for lang in $ALL_LINGUAS; do
  1291.             POFILES="$POFILES $srcdirpre$lang.po"
  1292.             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
  1293.             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
  1294.             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
  1295.           done
  1296.           # CATALOGS depends on both $ac_dir and the user's LINGUAS
  1297.           # environment variable.
  1298.           INST_LINGUAS=
  1299.           if test -n "$ALL_LINGUAS"; then
  1300.             for presentlang in $ALL_LINGUAS; do
  1301.               useit=no
  1302.               if test "%UNSET%" != "$LINGUAS"; then
  1303.                 desiredlanguages="$LINGUAS"
  1304.               else
  1305.                 desiredlanguages="$ALL_LINGUAS"
  1306.               fi
  1307.               for desiredlang in $desiredlanguages; do
  1308.                 # Use the presentlang catalog if desiredlang is
  1309.                 #   a. equal to presentlang, or
  1310.                 #   b. a variant of presentlang (because in this case,
  1311.                 #      presentlang can be used as a fallback for messages
  1312.                 #      which are not translated in the desiredlang catalog).
  1313.                 case "$desiredlang" in
  1314.                   "$presentlang"*) useit=yes;;
  1315.                 esac
  1316.               done
  1317.               if test $useit = yes; then
  1318.                 INST_LINGUAS="$INST_LINGUAS $presentlang"
  1319.               fi
  1320.             done
  1321.           fi
  1322.           CATALOGS=
  1323.           if test -n "$INST_LINGUAS"; then
  1324.             for lang in $INST_LINGUAS; do
  1325.               CATALOGS="$CATALOGS $lang.gmo"
  1326.             done
  1327.           fi
  1328.           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
  1329.           sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
  1330.           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
  1331.             if test -f "$f"; then
  1332.               case "$f" in
  1333.                 *.orig | *.bak | *~) ;;
  1334.                 *) cat "$f" >> "$ac_dir/Makefile" ;;
  1335.               esac
  1336.             fi
  1337.           done
  1338.         fi
  1339.         ;;
  1340.       esac
  1341.     done],
  1342.    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
  1343.     # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
  1344.     # from automake.
  1345.     eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
  1346.     # Capture the value of LINGUAS because we need it to compute CATALOGS.
  1347.     LINGUAS="${LINGUAS-%UNSET%}"
  1348.    ])
  1349. ])
  1350.  
  1351.  
  1352. dnl Checks for all prerequisites of the intl subdirectory,
  1353. dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
  1354. dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
  1355. AC_DEFUN([AM_INTL_SUBDIR],
  1356. [
  1357.   AC_REQUIRE([AC_PROG_INSTALL])dnl
  1358.   AC_REQUIRE([AM_MKINSTALLDIRS])dnl
  1359.   AC_REQUIRE([AC_PROG_CC])dnl
  1360.   AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1361.   AC_REQUIRE([AC_PROG_RANLIB])dnl
  1362.   AC_REQUIRE([AC_ISC_POSIX])dnl
  1363.   AC_REQUIRE([AC_HEADER_STDC])dnl
  1364.   AC_REQUIRE([AC_C_CONST])dnl
  1365.   AC_REQUIRE([AC_C_INLINE])dnl
  1366.   AC_REQUIRE([AC_TYPE_OFF_T])dnl
  1367.   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
  1368.   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
  1369.   AC_REQUIRE([AC_FUNC_MMAP])dnl
  1370.   AC_REQUIRE([jm_GLIBC21])dnl
  1371.   AC_REQUIRE([gt_INTDIV0])dnl
  1372.   AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
  1373.   AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
  1374.   AC_REQUIRE([gt_INTTYPES_PRI])dnl
  1375.  
  1376.   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
  1377. stdlib.h string.h unistd.h sys/param.h])
  1378.   AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
  1379. geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
  1380. strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
  1381.  
  1382.   AM_ICONV
  1383.   AM_LANGINFO_CODESET
  1384.   if test $ac_cv_header_locale_h = yes; then
  1385.     AM_LC_MESSAGES
  1386.   fi
  1387.  
  1388.   dnl intl/plural.c is generated from intl/plural.y. It requires bison,
  1389.   dnl because plural.y uses bison specific features. It requires at least
  1390.   dnl bison-1.26 because earlier versions generate a plural.c that doesn't
  1391.   dnl compile.
  1392.   dnl bison is only needed for the maintainer (who touches plural.y). But in
  1393.   dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
  1394.   dnl the rule in general Makefile. Now, some people carelessly touch the
  1395.   dnl files or have a broken "make" program, hence the plural.c rule will
  1396.   dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
  1397.   dnl present or too old.
  1398.   AC_CHECK_PROGS([INTLBISON], [bison])
  1399.   if test -z "$INTLBISON"; then
  1400.     ac_verc_fail=yes
  1401.   else
  1402.     dnl Found it, now check the version.
  1403.     AC_MSG_CHECKING([version of bison])
  1404. changequote(<<,>>)dnl
  1405.     ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  1406.     case $ac_prog_version in
  1407.       '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  1408.       1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
  1409. changequote([,])dnl
  1410.          ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
  1411.       *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
  1412.     esac
  1413.     AC_MSG_RESULT([$ac_prog_version])
  1414.   fi
  1415.   if test $ac_verc_fail = yes; then
  1416.     INTLBISON=:
  1417.   fi
  1418. ])
  1419.  
  1420.  
  1421. AC_DEFUN([AM_MKINSTALLDIRS],
  1422. [
  1423.   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
  1424.   dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
  1425.   dnl Try to locate is.
  1426.   MKINSTALLDIRS=
  1427.   if test -n "$ac_aux_dir"; then
  1428.     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
  1429.   fi
  1430.   if test -z "$MKINSTALLDIRS"; then
  1431.     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
  1432.   fi
  1433.   AC_SUBST(MKINSTALLDIRS)
  1434. ])
  1435.  
  1436.  
  1437. dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
  1438. AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
  1439.  
  1440. # lib-prefix.m4 serial 1 (gettext-0.11)
  1441. dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
  1442. dnl This file is free software, distributed under the terms of the GNU
  1443. dnl General Public License.  As a special exception to the GNU General
  1444. dnl Public License, this file may be distributed as part of a program
  1445. dnl that contains a configuration script generated by Autoconf, under
  1446. dnl the same distribution terms as the rest of that program.
  1447.  
  1448. dnl From Bruno Haible.
  1449.  
  1450. dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
  1451. dnl to access previously installed libraries. The basic assumption is that
  1452. dnl a user will want packages to use other packages he previously installed
  1453. dnl with the same --prefix option.
  1454. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
  1455. dnl libraries, but is otherwise very convenient.
  1456. AC_DEFUN([AC_LIB_PREFIX],
  1457. [
  1458.   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
  1459.   AC_REQUIRE([AC_PROG_CC])
  1460.   AC_REQUIRE([AC_CANONICAL_HOST])
  1461.   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  1462.   dnl By default, look in $includedir and $libdir.
  1463.   use_additional=yes
  1464.   AC_LIB_WITH_FINAL_PREFIX([
  1465.     eval additional_includedir=\"$includedir\"
  1466.     eval additional_libdir=\"$libdir\"
  1467.   ])
  1468.   AC_ARG_WITH([lib-prefix],
  1469. [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
  1470.   --without-lib-prefix    don't search for libraries in includedir and libdir],
  1471. [
  1472.     if test "X$withval" = "Xno"; then
  1473.       use_additional=no
  1474.     else
  1475.       if test "X$withval" = "X"; then
  1476.         AC_LIB_WITH_FINAL_PREFIX([
  1477.           eval additional_includedir=\"$includedir\"
  1478.           eval additional_libdir=\"$libdir\"
  1479.         ])
  1480.       else
  1481.         additional_includedir="$withval/include"
  1482.         additional_libdir="$withval/lib"
  1483.       fi
  1484.     fi
  1485. ])
  1486.   if test $use_additional = yes; then
  1487.     dnl Potentially add $additional_includedir to $CPPFLAGS.
  1488.     dnl But don't add it
  1489.     dnl   1. if it's the standard /usr/include,
  1490.     dnl   2. if it's already present in $CPPFLAGS,
  1491.     dnl   3. if it's /usr/local/include and we are using GCC on Linux,
  1492.     dnl   4. if it doesn't exist as a directory.
  1493.     if test "X$additional_includedir" != "X/usr/include"; then
  1494.       haveit=
  1495.       for x in $CPPFLAGS; do
  1496.         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1497.         if test "X$x" = "X-I$additional_includedir"; then
  1498.           haveit=yes
  1499.           break
  1500.         fi
  1501.       done
  1502.       if test -z "$haveit"; then
  1503.         if test "X$additional_includedir" = "X/usr/local/include"; then
  1504.           if test -n "$GCC"; then
  1505.             case $host_os in
  1506.               linux*) haveit=yes;;
  1507.             esac
  1508.           fi
  1509.         fi
  1510.         if test -z "$haveit"; then
  1511.           if test -d "$additional_includedir"; then
  1512.             dnl Really add $additional_includedir to $CPPFLAGS.
  1513.             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
  1514.           fi
  1515.         fi
  1516.       fi
  1517.     fi
  1518.     dnl Potentially add $additional_libdir to $LDFLAGS.
  1519.     dnl But don't add it
  1520.     dnl   1. if it's the standard /usr/lib,
  1521.     dnl   2. if it's already present in $LDFLAGS,
  1522.     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
  1523.     dnl   4. if it doesn't exist as a directory.
  1524.     if test "X$additional_libdir" != "X/usr/lib"; then
  1525.       haveit=
  1526.       for x in $LDFLAGS; do
  1527.         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1528.         if test "X$x" = "X-L$additional_libdir"; then
  1529.           haveit=yes
  1530.           break
  1531.         fi
  1532.       done
  1533.       if test -z "$haveit"; then
  1534.         if test "X$additional_libdir" = "X/usr/local/lib"; then
  1535.           if test -n "$GCC"; then
  1536.             case $host_os in
  1537.               linux*) haveit=yes;;
  1538.             esac
  1539.           fi
  1540.         fi
  1541.         if test -z "$haveit"; then
  1542.           if test -d "$additional_libdir"; then
  1543.             dnl Really add $additional_libdir to $LDFLAGS.
  1544.             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
  1545.           fi
  1546.         fi
  1547.       fi
  1548.     fi
  1549.   fi
  1550. ])
  1551.  
  1552. dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
  1553. dnl acl_final_exec_prefix, containing the values to which $prefix and
  1554. dnl $exec_prefix will expand at the end of the configure script.
  1555. AC_DEFUN([AC_LIB_PREPARE_PREFIX],
  1556. [
  1557.   dnl Unfortunately, prefix and exec_prefix get only finally determined
  1558.   dnl at the end of configure.
  1559.   if test "X$prefix" = "XNONE"; then
  1560.     acl_final_prefix="$ac_default_prefix"
  1561.   else
  1562.     acl_final_prefix="$prefix"
  1563.   fi
  1564.   if test "X$exec_prefix" = "XNONE"; then
  1565.     acl_final_exec_prefix='${prefix}'
  1566.   else
  1567.     acl_final_exec_prefix="$exec_prefix"
  1568.   fi
  1569.   acl_save_prefix="$prefix"
  1570.   prefix="$acl_final_prefix"
  1571.   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
  1572.   prefix="$acl_save_prefix"
  1573. ])
  1574.  
  1575. dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
  1576. dnl variables prefix and exec_prefix bound to the values they will have
  1577. dnl at the end of the configure script.
  1578. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
  1579. [
  1580.   acl_save_prefix="$prefix"
  1581.   prefix="$acl_final_prefix"
  1582.   acl_save_exec_prefix="$exec_prefix"
  1583.   exec_prefix="$acl_final_exec_prefix"
  1584.   $1
  1585.   exec_prefix="$acl_save_exec_prefix"
  1586.   prefix="$acl_save_prefix"
  1587. ])
  1588.  
  1589. # lib-link.m4 serial 3 (gettext-0.11.3)
  1590. dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
  1591. dnl This file is free software, distributed under the terms of the GNU
  1592. dnl General Public License.  As a special exception to the GNU General
  1593. dnl Public License, this file may be distributed as part of a program
  1594. dnl that contains a configuration script generated by Autoconf, under
  1595. dnl the same distribution terms as the rest of that program.
  1596.  
  1597. dnl From Bruno Haible.
  1598.  
  1599. dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
  1600. dnl the libraries corresponding to explicit and implicit dependencies.
  1601. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
  1602. dnl augments the CPPFLAGS variable.
  1603. AC_DEFUN([AC_LIB_LINKFLAGS],
  1604. [
  1605.   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  1606.   AC_REQUIRE([AC_LIB_RPATH])
  1607.   define([Name],[translit([$1],[./-], [___])])
  1608.   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
  1609.                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
  1610.   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
  1611.     AC_LIB_LINKFLAGS_BODY([$1], [$2])
  1612.     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
  1613.     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
  1614.     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
  1615.   ])
  1616.   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
  1617.   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
  1618.   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
  1619.   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
  1620.   AC_SUBST([LIB]NAME)
  1621.   AC_SUBST([LTLIB]NAME)
  1622.   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
  1623.   dnl results of this search when this library appears as a dependency.
  1624.   HAVE_LIB[]NAME=yes
  1625.   undefine([Name])
  1626.   undefine([NAME])
  1627. ])
  1628.  
  1629. dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
  1630. dnl searches for libname and the libraries corresponding to explicit and
  1631. dnl implicit dependencies, together with the specified include files and
  1632. dnl the ability to compile and link the specified testcode. If found, it
  1633. dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
  1634. dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
  1635. dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
  1636. dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
  1637. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
  1638. [
  1639.   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  1640.   AC_REQUIRE([AC_LIB_RPATH])
  1641.   define([Name],[translit([$1],[./-], [___])])
  1642.   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
  1643.                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
  1644.  
  1645.   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
  1646.   dnl accordingly.
  1647.   AC_LIB_LINKFLAGS_BODY([$1], [$2])
  1648.  
  1649.   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
  1650.   dnl because if the user has installed lib[]Name and not disabled its use
  1651.   dnl via --without-lib[]Name-prefix, he wants to use it.
  1652.   ac_save_CPPFLAGS="$CPPFLAGS"
  1653.   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
  1654.  
  1655.   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
  1656.     ac_save_LIBS="$LIBS"
  1657.     LIBS="$LIBS $LIB[]NAME"
  1658.     AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
  1659.     LIBS="$ac_save_LIBS"
  1660.   ])
  1661.   if test "$ac_cv_lib[]Name" = yes; then
  1662.     HAVE_LIB[]NAME=yes
  1663.     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
  1664.     AC_MSG_CHECKING([how to link with lib[]$1])
  1665.     AC_MSG_RESULT([$LIB[]NAME])
  1666.   else
  1667.     HAVE_LIB[]NAME=no
  1668.     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
  1669.     dnl $INC[]NAME either.
  1670.     CPPFLAGS="$ac_save_CPPFLAGS"
  1671.     LIB[]NAME=
  1672.     LTLIB[]NAME=
  1673.   fi
  1674.   AC_SUBST([HAVE_LIB]NAME)
  1675.   AC_SUBST([LIB]NAME)
  1676.   AC_SUBST([LTLIB]NAME)
  1677.   undefine([Name])
  1678.   undefine([NAME])
  1679. ])
  1680.  
  1681. dnl Determine the platform dependent parameters needed to use rpath:
  1682. dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
  1683. dnl hardcode_direct, hardcode_minus_L,
  1684. dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
  1685. AC_DEFUN([AC_LIB_RPATH],
  1686. [
  1687.   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
  1688.   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
  1689.   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
  1690.   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
  1691.   AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
  1692.     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
  1693.     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
  1694.     . ./conftest.sh
  1695.     rm -f ./conftest.sh
  1696.     acl_cv_rpath=done
  1697.   ])
  1698.   wl="$acl_cv_wl"
  1699.   libext="$acl_cv_libext"
  1700.   shlibext="$acl_cv_shlibext"
  1701.   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
  1702.   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
  1703.   hardcode_direct="$acl_cv_hardcode_direct"
  1704.   hardcode_minus_L="$acl_cv_hardcode_minus_L"
  1705.   sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
  1706.   sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
  1707.   dnl Determine whether the user wants rpath handling at all.
  1708.   AC_ARG_ENABLE(rpath,
  1709.     [  --disable-rpath         do not hardcode runtime library paths],
  1710.     :, enable_rpath=yes)
  1711. ])
  1712.  
  1713. dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
  1714. dnl the libraries corresponding to explicit and implicit dependencies.
  1715. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
  1716. AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
  1717. [
  1718.   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
  1719.                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
  1720.   dnl By default, look in $includedir and $libdir.
  1721.   use_additional=yes
  1722.   AC_LIB_WITH_FINAL_PREFIX([
  1723.     eval additional_includedir=\"$includedir\"
  1724.     eval additional_libdir=\"$libdir\"
  1725.   ])
  1726.   AC_ARG_WITH([lib$1-prefix],
  1727. [  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
  1728.   --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
  1729. [
  1730.     if test "X$withval" = "Xno"; then
  1731.       use_additional=no
  1732.     else
  1733.       if test "X$withval" = "X"; then
  1734.         AC_LIB_WITH_FINAL_PREFIX([
  1735.           eval additional_includedir=\"$includedir\"
  1736.           eval additional_libdir=\"$libdir\"
  1737.         ])
  1738.       else
  1739.         additional_includedir="$withval/include"
  1740.         additional_libdir="$withval/lib"
  1741.       fi
  1742.     fi
  1743. ])
  1744.   dnl Search the library and its dependencies in $additional_libdir and
  1745.   dnl $LDFLAGS. Using breadth-first-seach.
  1746.   LIB[]NAME=
  1747.   LTLIB[]NAME=
  1748.   INC[]NAME=
  1749.   rpathdirs=
  1750.   ltrpathdirs=
  1751.   names_already_handled=
  1752.   names_next_round='$1 $2'
  1753.   while test -n "$names_next_round"; do
  1754.     names_this_round="$names_next_round"
  1755.     names_next_round=
  1756.     for name in $names_this_round; do
  1757.       already_handled=
  1758.       for n in $names_already_handled; do
  1759.         if test "$n" = "$name"; then
  1760.           already_handled=yes
  1761.           break
  1762.         fi
  1763.       done
  1764.       if test -z "$already_handled"; then
  1765.         names_already_handled="$names_already_handled $name"
  1766.         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
  1767.         dnl or AC_LIB_HAVE_LINKFLAGS call.
  1768.         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
  1769.         eval value=\"\$HAVE_LIB$uppername\"
  1770.         if test -n "$value"; then
  1771.           if test "$value" = yes; then
  1772.             eval value=\"\$LIB$uppername\"
  1773.             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
  1774.             eval value=\"\$LTLIB$uppername\"
  1775.             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
  1776.           else
  1777.             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
  1778.             dnl that this library doesn't exist. So just drop it.
  1779.             :
  1780.           fi
  1781.         else
  1782.           dnl Search the library lib$name in $additional_libdir and $LDFLAGS
  1783.           dnl and the already constructed $LIBNAME/$LTLIBNAME.
  1784.           found_dir=
  1785.           found_la=
  1786.           found_so=
  1787.           found_a=
  1788.           if test $use_additional = yes; then
  1789.             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
  1790.               found_dir="$additional_libdir"
  1791.               found_so="$additional_libdir/lib$name.$shlibext"
  1792.               if test -f "$additional_libdir/lib$name.la"; then
  1793.                 found_la="$additional_libdir/lib$name.la"
  1794.               fi
  1795.             else
  1796.               if test -f "$additional_libdir/lib$name.$libext"; then
  1797.                 found_dir="$additional_libdir"
  1798.                 found_a="$additional_libdir/lib$name.$libext"
  1799.                 if test -f "$additional_libdir/lib$name.la"; then
  1800.                   found_la="$additional_libdir/lib$name.la"
  1801.                 fi
  1802.               fi
  1803.             fi
  1804.           fi
  1805.           if test "X$found_dir" = "X"; then
  1806.             for x in $LDFLAGS $LTLIB[]NAME; do
  1807.               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1808.               case "$x" in
  1809.                 -L*)
  1810.                   dir=`echo "X$x" | sed -e 's/^X-L//'`
  1811.                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
  1812.                     found_dir="$dir"
  1813.                     found_so="$dir/lib$name.$shlibext"
  1814.                     if test -f "$dir/lib$name.la"; then
  1815.                       found_la="$dir/lib$name.la"
  1816.                     fi
  1817.                   else
  1818.                     if test -f "$dir/lib$name.$libext"; then
  1819.                       found_dir="$dir"
  1820.                       found_a="$dir/lib$name.$libext"
  1821.                       if test -f "$dir/lib$name.la"; then
  1822.                         found_la="$dir/lib$name.la"
  1823.                       fi
  1824.                     fi
  1825.                   fi
  1826.                   ;;
  1827.               esac
  1828.               if test "X$found_dir" != "X"; then
  1829.                 break
  1830.               fi
  1831.             done
  1832.           fi
  1833.           if test "X$found_dir" != "X"; then
  1834.             dnl Found the library.
  1835.             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
  1836.             if test "X$found_so" != "X"; then
  1837.               dnl Linking with a shared library. We attempt to hardcode its
  1838.               dnl directory into the executable's runpath, unless it's the
  1839.               dnl standard /usr/lib.
  1840.               if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
  1841.                 dnl No hardcoding is needed.
  1842.                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  1843.               else
  1844.                 dnl Use an explicit option to hardcode DIR into the resulting
  1845.                 dnl binary.
  1846.                 dnl Potentially add DIR to ltrpathdirs.
  1847.                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
  1848.                 haveit=
  1849.                 for x in $ltrpathdirs; do
  1850.                   if test "X$x" = "X$found_dir"; then
  1851.                     haveit=yes
  1852.                     break
  1853.                   fi
  1854.                 done
  1855.                 if test -z "$haveit"; then
  1856.                   ltrpathdirs="$ltrpathdirs $found_dir"
  1857.                 fi
  1858.                 dnl The hardcoding into $LIBNAME is system dependent.
  1859.                 if test "$hardcode_direct" = yes; then
  1860.                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
  1861.                   dnl resulting binary.
  1862.                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  1863.                 else
  1864.                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
  1865.                     dnl Use an explicit option to hardcode DIR into the resulting
  1866.                     dnl binary.
  1867.                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  1868.                     dnl Potentially add DIR to rpathdirs.
  1869.                     dnl The rpathdirs will be appended to $LIBNAME at the end.
  1870.                     haveit=
  1871.                     for x in $rpathdirs; do
  1872.                       if test "X$x" = "X$found_dir"; then
  1873.                         haveit=yes
  1874.                         break
  1875.                       fi
  1876.                     done
  1877.                     if test -z "$haveit"; then
  1878.                       rpathdirs="$rpathdirs $found_dir"
  1879.                     fi
  1880.                   else
  1881.                     dnl Rely on "-L$found_dir".
  1882.                     dnl But don't add it if it's already contained in the LDFLAGS
  1883.                     dnl or the already constructed $LIBNAME
  1884.                     haveit=
  1885.                     for x in $LDFLAGS $LIB[]NAME; do
  1886.                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1887.                       if test "X$x" = "X-L$found_dir"; then
  1888.                         haveit=yes
  1889.                         break
  1890.                       fi
  1891.                     done
  1892.                     if test -z "$haveit"; then
  1893.                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
  1894.                     fi
  1895.                     if test "$hardcode_minus_L" != no; then
  1896.                       dnl FIXME: Not sure whether we should use
  1897.                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
  1898.                       dnl here.
  1899.                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  1900.                     else
  1901.                       dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
  1902.                       dnl here, because this doesn't fit in flags passed to the
  1903.                       dnl compiler. So give up. No hardcoding. This affects only
  1904.                       dnl very old systems.
  1905.                       dnl FIXME: Not sure whether we should use
  1906.                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
  1907.                       dnl here.
  1908.                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
  1909.                     fi
  1910.                   fi
  1911.                 fi
  1912.               fi
  1913.             else
  1914.               if test "X$found_a" != "X"; then
  1915.                 dnl Linking with a static library.
  1916.                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
  1917.               else
  1918.                 dnl We shouldn't come here, but anyway it's good to have a
  1919.                 dnl fallback.
  1920.                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
  1921.               fi
  1922.             fi
  1923.             dnl Assume the include files are nearby.
  1924.             additional_includedir=
  1925.             case "$found_dir" in
  1926.               */lib | */lib/)
  1927.                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
  1928.                 additional_includedir="$basedir/include"
  1929.                 ;;
  1930.             esac
  1931.             if test "X$additional_includedir" != "X"; then
  1932.               dnl Potentially add $additional_includedir to $INCNAME.
  1933.               dnl But don't add it
  1934.               dnl   1. if it's the standard /usr/include,
  1935.               dnl   2. if it's /usr/local/include and we are using GCC on Linux,
  1936.               dnl   3. if it's already present in $CPPFLAGS or the already
  1937.               dnl      constructed $INCNAME,
  1938.               dnl   4. if it doesn't exist as a directory.
  1939.               if test "X$additional_includedir" != "X/usr/include"; then
  1940.                 haveit=
  1941.                 if test "X$additional_includedir" = "X/usr/local/include"; then
  1942.                   if test -n "$GCC"; then
  1943.                     case $host_os in
  1944.                       linux*) haveit=yes;;
  1945.                     esac
  1946.                   fi
  1947.                 fi
  1948.                 if test -z "$haveit"; then
  1949.                   for x in $CPPFLAGS $INC[]NAME; do
  1950.                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1951.                     if test "X$x" = "X-I$additional_includedir"; then
  1952.                       haveit=yes
  1953.                       break
  1954.                     fi
  1955.                   done
  1956.                   if test -z "$haveit"; then
  1957.                     if test -d "$additional_includedir"; then
  1958.                       dnl Really add $additional_includedir to $INCNAME.
  1959.                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
  1960.                     fi
  1961.                   fi
  1962.                 fi
  1963.               fi
  1964.             fi
  1965.             dnl Look for dependencies.
  1966.             if test -n "$found_la"; then
  1967.               dnl Read the .la file. It defines the variables
  1968.               dnl dlname, library_names, old_library, dependency_libs, current,
  1969.               dnl age, revision, installed, dlopen, dlpreopen, libdir.
  1970.               save_libdir="$libdir"
  1971.               case "$found_la" in
  1972.                 */* | *\\*) . "$found_la" ;;
  1973.                 *) . "./$found_la" ;;
  1974.               esac
  1975.               libdir="$save_libdir"
  1976.               dnl We use only dependency_libs.
  1977.               for dep in $dependency_libs; do
  1978.                 case "$dep" in
  1979.                   -L*)
  1980.                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
  1981.                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
  1982.                     dnl But don't add it
  1983.                     dnl   1. if it's the standard /usr/lib,
  1984.                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
  1985.                     dnl   3. if it's already present in $LDFLAGS or the already
  1986.                     dnl      constructed $LIBNAME,
  1987.                     dnl   4. if it doesn't exist as a directory.
  1988.                     if test "X$additional_libdir" != "X/usr/lib"; then
  1989.                       haveit=
  1990.                       if test "X$additional_libdir" = "X/usr/local/lib"; then
  1991.                         if test -n "$GCC"; then
  1992.                           case $host_os in
  1993.                             linux*) haveit=yes;;
  1994.                           esac
  1995.                         fi
  1996.                       fi
  1997.                       if test -z "$haveit"; then
  1998.                         haveit=
  1999.                         for x in $LDFLAGS $LIB[]NAME; do
  2000.                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  2001.                           if test "X$x" = "X-L$additional_libdir"; then
  2002.                             haveit=yes
  2003.                             break
  2004.                           fi
  2005.                         done
  2006.                         if test -z "$haveit"; then
  2007.                           if test -d "$additional_libdir"; then
  2008.                             dnl Really add $additional_libdir to $LIBNAME.
  2009.                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
  2010.                           fi
  2011.                         fi
  2012.                         haveit=
  2013.                         for x in $LDFLAGS $LTLIB[]NAME; do
  2014.                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  2015.                           if test "X$x" = "X-L$additional_libdir"; then
  2016.                             haveit=yes
  2017.                             break
  2018.                           fi
  2019.                         done
  2020.                         if test -z "$haveit"; then
  2021.                           if test -d "$additional_libdir"; then
  2022.                             dnl Really add $additional_libdir to $LTLIBNAME.
  2023.                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
  2024.                           fi
  2025.                         fi
  2026.                       fi
  2027.                     fi
  2028.                     ;;
  2029.                   -R*)
  2030.                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
  2031.                     if test "$enable_rpath" != no; then
  2032.                       dnl Potentially add DIR to rpathdirs.
  2033.                       dnl The rpathdirs will be appended to $LIBNAME at the end.
  2034.                       haveit=
  2035.                       for x in $rpathdirs; do
  2036.                         if test "X$x" = "X$dir"; then
  2037.                           haveit=yes
  2038.                           break
  2039.                         fi
  2040.                       done
  2041.                       if test -z "$haveit"; then
  2042.                         rpathdirs="$rpathdirs $dir"
  2043.                       fi
  2044.                       dnl Potentially add DIR to ltrpathdirs.
  2045.                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
  2046.                       haveit=
  2047.                       for x in $ltrpathdirs; do
  2048.                         if test "X$x" = "X$dir"; then
  2049.                           haveit=yes
  2050.                           break
  2051.                         fi
  2052.                       done
  2053.                       if test -z "$haveit"; then
  2054.                         ltrpathdirs="$ltrpathdirs $dir"
  2055.                       fi
  2056.                     fi
  2057.                     ;;
  2058.                   -l*)
  2059.                     dnl Handle this in the next round.
  2060.                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
  2061.                     ;;
  2062.                   *.la)
  2063.                     dnl Handle this in the next round. Throw away the .la's
  2064.                     dnl directory; it is already contained in a preceding -L
  2065.                     dnl option.
  2066.                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
  2067.                     ;;
  2068.                   *)
  2069.                     dnl Most likely an immediate library name.
  2070.                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
  2071.                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
  2072.                     ;;
  2073.                 esac
  2074.               done
  2075.             fi
  2076.           else
  2077.             dnl Didn't find the library; assume it is in the system directories
  2078.             dnl known to the linker and runtime loader. (All the system
  2079.             dnl directories known to the linker should also be known to the
  2080.             dnl runtime loader, otherwise the system is severely misconfigured.)
  2081.             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
  2082.             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
  2083.           fi
  2084.         fi
  2085.       fi
  2086.     done
  2087.   done
  2088.   if test "X$rpathdirs" != "X"; then
  2089.     if test -n "$hardcode_libdir_separator"; then
  2090.       dnl Weird platform: only the last -rpath option counts, the user must
  2091.       dnl pass all path elements in one option. We can arrange that for a
  2092.       dnl single library, but not when more than one $LIBNAMEs are used.
  2093.       alldirs=
  2094.       for found_dir in $rpathdirs; do
  2095.         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
  2096.       done
  2097.       dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
  2098.       acl_save_libdir="$libdir"
  2099.       libdir="$alldirs"
  2100.       eval flag=\"$hardcode_libdir_flag_spec\"
  2101.       libdir="$acl_save_libdir"
  2102.       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
  2103.     else
  2104.       dnl The -rpath options are cumulative.
  2105.       for found_dir in $rpathdirs; do
  2106.         acl_save_libdir="$libdir"
  2107.         libdir="$found_dir"
  2108.         eval flag=\"$hardcode_libdir_flag_spec\"
  2109.         libdir="$acl_save_libdir"
  2110.         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
  2111.       done
  2112.     fi
  2113.   fi
  2114.   if test "X$ltrpathdirs" != "X"; then
  2115.     dnl When using libtool, the option that works for both libraries and
  2116.     dnl executables is -R. The -R options are cumulative.
  2117.     for found_dir in $ltrpathdirs; do
  2118.       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
  2119.     done
  2120.   fi
  2121. ])
  2122.  
  2123. dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
  2124. dnl unless already present in VAR.
  2125. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
  2126. dnl contains two or three consecutive elements that belong together.
  2127. AC_DEFUN([AC_LIB_APPENDTOVAR],
  2128. [
  2129.   for element in [$2]; do
  2130.     haveit=
  2131.     for x in $[$1]; do
  2132.       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  2133.       if test "X$x" = "X$element"; then
  2134.         haveit=yes
  2135.         break
  2136.       fi
  2137.     done
  2138.     if test -z "$haveit"; then
  2139.       [$1]="${[$1]}${[$1]:+ }$element"
  2140.     fi
  2141.   done
  2142. ])
  2143.  
  2144. # lib-ld.m4 serial 1 (gettext-0.11)
  2145. dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
  2146. dnl This file is free software, distributed under the terms of the GNU
  2147. dnl General Public License.  As a special exception to the GNU General
  2148. dnl Public License, this file may be distributed as part of a program
  2149. dnl that contains a configuration script generated by Autoconf, under
  2150. dnl the same distribution terms as the rest of that program.
  2151.  
  2152. dnl Subroutines of libtool.m4,
  2153. dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
  2154. dnl with libtool.m4.
  2155.  
  2156. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
  2157. AC_DEFUN([AC_LIB_PROG_LD_GNU],
  2158. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
  2159. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  2160. if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  2161.   acl_cv_prog_gnu_ld=yes
  2162. else
  2163.   acl_cv_prog_gnu_ld=no
  2164. fi])
  2165. with_gnu_ld=$acl_cv_prog_gnu_ld
  2166. ])
  2167.  
  2168. dnl From libtool-1.4. Sets the variable LD.
  2169. AC_DEFUN([AC_LIB_PROG_LD],
  2170. [AC_ARG_WITH(gnu-ld,
  2171. [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
  2172. test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
  2173. AC_REQUIRE([AC_PROG_CC])dnl
  2174. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2175. ac_prog=ld
  2176. if test "$GCC" = yes; then
  2177.   # Check if gcc -print-prog-name=ld gives a path.
  2178.   AC_MSG_CHECKING([for ld used by GCC])
  2179.   case $host in
  2180.   *-*-mingw*)
  2181.     # gcc leaves a trailing carriage return which upsets mingw
  2182.     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2183.   *)
  2184.     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2185.   esac
  2186.   case $ac_prog in
  2187.     # Accept absolute paths.
  2188.     [[\\/]* | [A-Za-z]:[\\/]*)]
  2189.       [re_direlt='/[^/][^/]*/\.\./']
  2190.       # Canonicalize the path of ld
  2191.       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  2192.       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  2193.     ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  2194.       done
  2195.       test -z "$LD" && LD="$ac_prog"
  2196.       ;;
  2197.   "")
  2198.     # If it fails, then pretend we aren't using GCC.
  2199.     ac_prog=ld
  2200.     ;;
  2201.   *)
  2202.     # If it is relative, then search for the first ld in PATH.
  2203.     with_gnu_ld=unknown
  2204.     ;;
  2205.   esac
  2206. elif test "$with_gnu_ld" = yes; then
  2207.   AC_MSG_CHECKING([for GNU ld])
  2208. else
  2209.   AC_MSG_CHECKING([for non-GNU ld])
  2210. fi
  2211. AC_CACHE_VAL(acl_cv_path_LD,
  2212. [if test -z "$LD"; then
  2213.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  2214.   for ac_dir in $PATH; do
  2215.     test -z "$ac_dir" && ac_dir=.
  2216.     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2217.       acl_cv_path_LD="$ac_dir/$ac_prog"
  2218.       # Check to see if the program is GNU ld.  I'd rather use --version,
  2219.       # but apparently some GNU ld's only accept -v.
  2220.       # Break only if it was the GNU/non-GNU ld that we prefer.
  2221.       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
  2222.     test "$with_gnu_ld" != no && break
  2223.       else
  2224.     test "$with_gnu_ld" != yes && break
  2225.       fi
  2226.     fi
  2227.   done
  2228.   IFS="$ac_save_ifs"
  2229. else
  2230.   acl_cv_path_LD="$LD" # Let the user override the test with a path.
  2231. fi])
  2232. LD="$acl_cv_path_LD"
  2233. if test -n "$LD"; then
  2234.   AC_MSG_RESULT($LD)
  2235. else
  2236.   AC_MSG_RESULT(no)
  2237. fi
  2238. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2239. AC_LIB_PROG_LD_GNU
  2240. ])
  2241.  
  2242. # iconv.m4 serial AM4 (gettext-0.11.3)
  2243. dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
  2244. dnl This file is free software, distributed under the terms of the GNU
  2245. dnl General Public License.  As a special exception to the GNU General
  2246. dnl Public License, this file may be distributed as part of a program
  2247. dnl that contains a configuration script generated by Autoconf, under
  2248. dnl the same distribution terms as the rest of that program.
  2249.  
  2250. dnl From Bruno Haible.
  2251.  
  2252. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
  2253. [
  2254.   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
  2255.   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  2256.   AC_REQUIRE([AC_LIB_RPATH])
  2257.  
  2258.   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
  2259.   dnl accordingly.
  2260.   AC_LIB_LINKFLAGS_BODY([iconv])
  2261. ])
  2262.  
  2263. AC_DEFUN([AM_ICONV_LINK],
  2264. [
  2265.   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
  2266.   dnl those with the standalone portable GNU libiconv installed).
  2267.  
  2268.   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
  2269.   dnl accordingly.
  2270.   AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
  2271.  
  2272.   dnl Add $INCICONV to CPPFLAGS before performing the following checks,
  2273.   dnl because if the user has installed libiconv and not disabled its use
  2274.   dnl via --without-libiconv-prefix, he wants to use it. The first
  2275.   dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
  2276.   am_save_CPPFLAGS="$CPPFLAGS"
  2277.   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
  2278.  
  2279.   AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
  2280.     am_cv_func_iconv="no, consider installing GNU libiconv"
  2281.     am_cv_lib_iconv=no
  2282.     AC_TRY_LINK([#include <stdlib.h>
  2283. #include <iconv.h>],
  2284.       [iconv_t cd = iconv_open("","");
  2285.        iconv(cd,NULL,NULL,NULL,NULL);
  2286.        iconv_close(cd);],
  2287.       am_cv_func_iconv=yes)
  2288.     if test "$am_cv_func_iconv" != yes; then
  2289.       am_save_LIBS="$LIBS"
  2290.       LIBS="$LIBS $LIBICONV"
  2291.       AC_TRY_LINK([#include <stdlib.h>
  2292. #include <iconv.h>],
  2293.         [iconv_t cd = iconv_open("","");
  2294.          iconv(cd,NULL,NULL,NULL,NULL);
  2295.          iconv_close(cd);],
  2296.         am_cv_lib_iconv=yes
  2297.         am_cv_func_iconv=yes)
  2298.       LIBS="$am_save_LIBS"
  2299.     fi
  2300.   ])
  2301.   if test "$am_cv_func_iconv" = yes; then
  2302.     AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
  2303.   fi
  2304.   if test "$am_cv_lib_iconv" = yes; then
  2305.     AC_MSG_CHECKING([how to link with libiconv])
  2306.     AC_MSG_RESULT([$LIBICONV])
  2307.   else
  2308.     dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
  2309.     dnl either.
  2310.     CPPFLAGS="$am_save_CPPFLAGS"
  2311.     LIBICONV=
  2312.     LTLIBICONV=
  2313.   fi
  2314.   AC_SUBST(LIBICONV)
  2315.   AC_SUBST(LTLIBICONV)
  2316. ])
  2317.  
  2318. AC_DEFUN([AM_ICONV],
  2319. [
  2320.   AM_ICONV_LINK
  2321.   if test "$am_cv_func_iconv" = yes; then
  2322.     AC_MSG_CHECKING([for iconv declaration])
  2323.     AC_CACHE_VAL(am_cv_proto_iconv, [
  2324.       AC_TRY_COMPILE([
  2325. #include <stdlib.h>
  2326. #include <iconv.h>
  2327. extern
  2328. #ifdef __cplusplus
  2329. "C"
  2330. #endif
  2331. #if defined(__STDC__) || defined(__cplusplus)
  2332. size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
  2333. #else
  2334. size_t iconv();
  2335. #endif
  2336. ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
  2337.       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
  2338.     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
  2339.     AC_MSG_RESULT([$]{ac_t:-
  2340.          }[$]am_cv_proto_iconv)
  2341.     AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
  2342.       [Define as const if the declaration of iconv() needs const.])
  2343.   fi
  2344. ])
  2345.  
  2346. # progtest.m4 serial 2 (gettext-0.10.40)
  2347. dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
  2348. dnl This file is free software, distributed under the terms of the GNU
  2349. dnl General Public License.  As a special exception to the GNU General
  2350. dnl Public License, this file may be distributed as part of a program
  2351. dnl that contains a configuration script generated by Autoconf, under
  2352. dnl the same distribution terms as the rest of that program.
  2353. dnl
  2354. dnl This file can can be used in projects which are not available under
  2355. dnl the GNU General Public License or the GNU Library General Public
  2356. dnl License but which still want to provide support for the GNU gettext
  2357. dnl functionality.
  2358. dnl Please note that the actual code of the GNU gettext library is covered
  2359. dnl by the GNU Library General Public License, and the rest of the GNU
  2360. dnl gettext package package is covered by the GNU General Public License.
  2361. dnl They are *not* in the public domain.
  2362.  
  2363. dnl Authors:
  2364. dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
  2365.  
  2366. # Search path for a program which passes the given test.
  2367.  
  2368. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
  2369. dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
  2370. AC_DEFUN([AM_PATH_PROG_WITH_TEST],
  2371. [# Extract the first word of "$2", so it can be a program name with args.
  2372. set dummy $2; ac_word=[$]2
  2373. AC_MSG_CHECKING([for $ac_word])
  2374. AC_CACHE_VAL(ac_cv_path_$1,
  2375. [case "[$]$1" in
  2376.   /*)
  2377.   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
  2378.   ;;
  2379.   *)
  2380.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2381.   for ac_dir in ifelse([$5], , $PATH, [$5]); do
  2382.     test -z "$ac_dir" && ac_dir=.
  2383.     if test -f $ac_dir/$ac_word; then
  2384.       if [$3]; then
  2385.     ac_cv_path_$1="$ac_dir/$ac_word"
  2386.     break
  2387.       fi
  2388.     fi
  2389.   done
  2390.   IFS="$ac_save_ifs"
  2391. dnl If no 4th arg is given, leave the cache variable unset,
  2392. dnl so AC_PATH_PROGS will keep looking.
  2393. ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
  2394. ])dnl
  2395.   ;;
  2396. esac])dnl
  2397. $1="$ac_cv_path_$1"
  2398. if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
  2399.   AC_MSG_RESULT([$]$1)
  2400. else
  2401.   AC_MSG_RESULT(no)
  2402. fi
  2403. AC_SUBST($1)dnl
  2404. ])
  2405.  
  2406. # isc-posix.m4 serial 2 (gettext-0.11.2)
  2407. dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
  2408. dnl This file is free software, distributed under the terms of the GNU
  2409. dnl General Public License.  As a special exception to the GNU General
  2410. dnl Public License, this file may be distributed as part of a program
  2411. dnl that contains a configuration script generated by Autoconf, under
  2412. dnl the same distribution terms as the rest of that program.
  2413.  
  2414. # This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
  2415.  
  2416. # This test replaces the one in autoconf.
  2417. # Currently this macro should have the same name as the autoconf macro
  2418. # because gettext's gettext.m4 (distributed in the automake package)
  2419. # still uses it.  Otherwise, the use in gettext.m4 makes autoheader
  2420. # give these diagnostics:
  2421. #   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
  2422. #   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
  2423.  
  2424. undefine([AC_ISC_POSIX])
  2425.  
  2426. AC_DEFUN([AC_ISC_POSIX],
  2427.   [
  2428.     dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
  2429.     AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
  2430.   ]
  2431. )
  2432.  
  2433. # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
  2434. dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
  2435. dnl This file is free software, distributed under the terms of the GNU
  2436. dnl General Public License.  As a special exception to the GNU General
  2437. dnl Public License, this file may be distributed as part of a program
  2438. dnl that contains a configuration script generated by Autoconf, under
  2439. dnl the same distribution terms as the rest of that program.
  2440.  
  2441. # Test for the GNU C Library, version 2.1 or newer.
  2442. # From Bruno Haible.
  2443.  
  2444. AC_DEFUN([jm_GLIBC21],
  2445.   [
  2446.     AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
  2447.       ac_cv_gnu_library_2_1,
  2448.       [AC_EGREP_CPP([Lucky GNU user],
  2449.     [
  2450. #include <features.h>
  2451. #ifdef __GNU_LIBRARY__
  2452.  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  2453.   Lucky GNU user
  2454.  #endif
  2455. #endif
  2456.     ],
  2457.     ac_cv_gnu_library_2_1=yes,
  2458.     ac_cv_gnu_library_2_1=no)
  2459.       ]
  2460.     )
  2461.     AC_SUBST(GLIBC21)
  2462.     GLIBC21="$ac_cv_gnu_library_2_1"
  2463.   ]
  2464. )
  2465.  
  2466. # intdiv0.m4 serial 1 (gettext-0.11.3)
  2467. dnl Copyright (C) 2002 Free Software Foundation, Inc.
  2468. dnl This file is free software, distributed under the terms of the GNU
  2469. dnl General Public License.  As a special exception to the GNU General
  2470. dnl Public License, this file may be distributed as part of a program
  2471. dnl that contains a configuration script generated by Autoconf, under
  2472. dnl the same distribution terms as the rest of that program.
  2473.  
  2474. dnl From Bruno Haible.
  2475.  
  2476. AC_DEFUN([gt_INTDIV0],
  2477. [
  2478.   AC_REQUIRE([AC_PROG_CC])dnl
  2479.   AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2480.  
  2481.   AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
  2482.     gt_cv_int_divbyzero_sigfpe,
  2483.     [
  2484.       AC_TRY_RUN([
  2485. #include <stdlib.h>
  2486. #include <signal.h>
  2487.  
  2488. static void
  2489. #ifdef __cplusplus
  2490. sigfpe_handler (int sig)
  2491. #else
  2492. sigfpe_handler (sig) int sig;
  2493. #endif
  2494. {
  2495.   /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
  2496.   exit (sig != SIGFPE);
  2497. }
  2498.  
  2499. int x = 1;
  2500. int y = 0;
  2501. int z;
  2502. int nan;
  2503.  
  2504. int main ()
  2505. {
  2506.   signal (SIGFPE, sigfpe_handler);
  2507. /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
  2508. #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
  2509.   signal (SIGTRAP, sigfpe_handler);
  2510. #endif
  2511. /* Linux/SPARC yields signal SIGILL.  */
  2512. #if defined (__sparc__) && defined (__linux__)
  2513.   signal (SIGILL, sigfpe_handler);
  2514. #endif
  2515.  
  2516.   z = x / y;
  2517.   nan = y / y;
  2518.   exit (1);
  2519. }
  2520. ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
  2521.         [
  2522.           # Guess based on the CPU.
  2523.           case "$host_cpu" in
  2524.             alpha* | i[34567]86 | m68k | s390*)
  2525.               gt_cv_int_divbyzero_sigfpe="guessing yes";;
  2526.             *)
  2527.               gt_cv_int_divbyzero_sigfpe="guessing no";;
  2528.           esac
  2529.         ])
  2530.     ])
  2531.   case "$gt_cv_int_divbyzero_sigfpe" in
  2532.     *yes) value=1;;
  2533.     *) value=0;;
  2534.   esac
  2535.   AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
  2536.     [Define if integer division by zero raises signal SIGFPE.])
  2537. ])
  2538.  
  2539. # uintmax_t.m4 serial 6 (gettext-0.11)
  2540. dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
  2541. dnl This file is free software, distributed under the terms of the GNU
  2542. dnl General Public License.  As a special exception to the GNU General
  2543. dnl Public License, this file may be distributed as part of a program
  2544. dnl that contains a configuration script generated by Autoconf, under
  2545. dnl the same distribution terms as the rest of that program.
  2546.  
  2547. dnl From Paul Eggert.
  2548.  
  2549. AC_PREREQ(2.13)
  2550.  
  2551. # Define uintmax_t to `unsigned long' or `unsigned long long'
  2552. # if <inttypes.h> does not exist.
  2553.  
  2554. AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
  2555. [
  2556.   AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
  2557.   AC_REQUIRE([jm_AC_HEADER_STDINT_H])
  2558.   if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
  2559.     AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
  2560.     test $ac_cv_type_unsigned_long_long = yes \
  2561.       && ac_type='unsigned long long' \
  2562.       || ac_type='unsigned long'
  2563.     AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
  2564.   [Define to unsigned long or unsigned long long
  2565.    if <inttypes.h> and <stdint.h> don't define.])
  2566.   fi
  2567. ])
  2568.  
  2569. # inttypes_h.m4 serial 4 (gettext-0.11.4)
  2570. dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
  2571. dnl This file is free software, distributed under the terms of the GNU
  2572. dnl General Public License.  As a special exception to the GNU General
  2573. dnl Public License, this file may be distributed as part of a program
  2574. dnl that contains a configuration script generated by Autoconf, under
  2575. dnl the same distribution terms as the rest of that program.
  2576.  
  2577. dnl From Paul Eggert.
  2578.  
  2579. # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
  2580. # doesn't clash with <sys/types.h>, and declares uintmax_t.
  2581.  
  2582. AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
  2583. [
  2584.   AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
  2585.   [AC_TRY_COMPILE(
  2586.     [#include <sys/types.h>
  2587. #include <inttypes.h>],
  2588.     [uintmax_t i = (uintmax_t) -1;],
  2589.     jm_ac_cv_header_inttypes_h=yes,
  2590.     jm_ac_cv_header_inttypes_h=no)])
  2591.   if test $jm_ac_cv_header_inttypes_h = yes; then
  2592.     AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
  2593. [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
  2594.    and declares uintmax_t. ])
  2595.   fi
  2596. ])
  2597.  
  2598. # stdint_h.m4 serial 2 (gettext-0.11.4)
  2599. dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
  2600. dnl This file is free software, distributed under the terms of the GNU
  2601. dnl General Public License.  As a special exception to the GNU General
  2602. dnl Public License, this file may be distributed as part of a program
  2603. dnl that contains a configuration script generated by Autoconf, under
  2604. dnl the same distribution terms as the rest of that program.
  2605.  
  2606. dnl From Paul Eggert.
  2607.  
  2608. # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
  2609. # doesn't clash with <sys/types.h>, and declares uintmax_t.
  2610.  
  2611. AC_DEFUN([jm_AC_HEADER_STDINT_H],
  2612. [
  2613.   AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
  2614.   [AC_TRY_COMPILE(
  2615.     [#include <sys/types.h>
  2616. #include <stdint.h>],
  2617.     [uintmax_t i = (uintmax_t) -1;],
  2618.     jm_ac_cv_header_stdint_h=yes,
  2619.     jm_ac_cv_header_stdint_h=no)])
  2620.   if test $jm_ac_cv_header_stdint_h = yes; then
  2621.     AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
  2622. [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
  2623.    and declares uintmax_t. ])
  2624.   fi
  2625. ])
  2626.  
  2627. # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
  2628. dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
  2629. dnl This file is free software, distributed under the terms of the GNU
  2630. dnl General Public License.  As a special exception to the GNU General
  2631. dnl Public License, this file may be distributed as part of a program
  2632. dnl that contains a configuration script generated by Autoconf, under
  2633. dnl the same distribution terms as the rest of that program.
  2634.  
  2635. dnl From Paul Eggert.
  2636.  
  2637. AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
  2638. [
  2639.   AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
  2640.   [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
  2641.     [unsigned long long ullmax = (unsigned long long) -1;
  2642.      return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
  2643.     ac_cv_type_unsigned_long_long=yes,
  2644.     ac_cv_type_unsigned_long_long=no)])
  2645.   if test $ac_cv_type_unsigned_long_long = yes; then
  2646.     AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
  2647.       [Define if you have the unsigned long long type.])
  2648.   fi
  2649. ])
  2650.  
  2651. # inttypes.m4 serial 1 (gettext-0.11.4)
  2652. dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
  2653. dnl This file is free software, distributed under the terms of the GNU
  2654. dnl General Public License.  As a special exception to the GNU General
  2655. dnl Public License, this file may be distributed as part of a program
  2656. dnl that contains a configuration script generated by Autoconf, under
  2657. dnl the same distribution terms as the rest of that program.
  2658.  
  2659. dnl From Paul Eggert.
  2660.  
  2661. # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
  2662. # <sys/types.h>.
  2663.  
  2664. AC_DEFUN([gt_HEADER_INTTYPES_H],
  2665. [
  2666.   AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
  2667.   [
  2668.     AC_TRY_COMPILE(
  2669.       [#include <sys/types.h>
  2670. #include <inttypes.h>],
  2671.       [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
  2672.   ])
  2673.   if test $gt_cv_header_inttypes_h = yes; then
  2674.     AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
  2675.       [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
  2676.   fi
  2677. ])
  2678.  
  2679. # inttypes-pri.m4 serial 1 (gettext-0.11.4)
  2680. dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
  2681. dnl This file is free software, distributed under the terms of the GNU
  2682. dnl General Public License.  As a special exception to the GNU General
  2683. dnl Public License, this file may be distributed as part of a program
  2684. dnl that contains a configuration script generated by Autoconf, under
  2685. dnl the same distribution terms as the rest of that program.
  2686.  
  2687. dnl From Bruno Haible.
  2688.  
  2689. # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
  2690. # macros to non-string values.  This is the case on AIX 4.3.3.
  2691.  
  2692. AC_DEFUN([gt_INTTYPES_PRI],
  2693. [
  2694.   AC_REQUIRE([gt_HEADER_INTTYPES_H])
  2695.   if test $gt_cv_header_inttypes_h = yes; then
  2696.     AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
  2697.       gt_cv_inttypes_pri_broken,
  2698.       [
  2699.         AC_TRY_COMPILE([#include <inttypes.h>
  2700. #ifdef PRId32
  2701. char *p = PRId32;
  2702. #endif
  2703. ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
  2704.       ])
  2705.   fi
  2706.   if test "$gt_cv_inttypes_pri_broken" = yes; then
  2707.     AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
  2708.       [Define if <inttypes.h> exists and defines unusable PRI* macros.])
  2709.   fi
  2710. ])
  2711.  
  2712. # codeset.m4 serial AM1 (gettext-0.10.40)
  2713. dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
  2714. dnl This file is free software, distributed under the terms of the GNU
  2715. dnl General Public License.  As a special exception to the GNU General
  2716. dnl Public License, this file may be distributed as part of a program
  2717. dnl that contains a configuration script generated by Autoconf, under
  2718. dnl the same distribution terms as the rest of that program.
  2719.  
  2720. dnl From Bruno Haible.
  2721.  
  2722. AC_DEFUN([AM_LANGINFO_CODESET],
  2723. [
  2724.   AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
  2725.     [AC_TRY_LINK([#include <langinfo.h>],
  2726.       [char* cs = nl_langinfo(CODESET);],
  2727.       am_cv_langinfo_codeset=yes,
  2728.       am_cv_langinfo_codeset=no)
  2729.     ])
  2730.   if test $am_cv_langinfo_codeset = yes; then
  2731.     AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
  2732.       [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
  2733.   fi
  2734. ])
  2735.  
  2736. # lcmessage.m4 serial 3 (gettext-0.11.3)
  2737. dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
  2738. dnl This file is free software, distributed under the terms of the GNU
  2739. dnl General Public License.  As a special exception to the GNU General
  2740. dnl Public License, this file may be distributed as part of a program
  2741. dnl that contains a configuration script generated by Autoconf, under
  2742. dnl the same distribution terms as the rest of that program.
  2743. dnl
  2744. dnl This file can can be used in projects which are not available under
  2745. dnl the GNU General Public License or the GNU Library General Public
  2746. dnl License but which still want to provide support for the GNU gettext
  2747. dnl functionality.
  2748. dnl Please note that the actual code of the GNU gettext library is covered
  2749. dnl by the GNU Library General Public License, and the rest of the GNU
  2750. dnl gettext package package is covered by the GNU General Public License.
  2751. dnl They are *not* in the public domain.
  2752.  
  2753. dnl Authors:
  2754. dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
  2755.  
  2756. # Check whether LC_MESSAGES is available in <locale.h>.
  2757.  
  2758. AC_DEFUN([AM_LC_MESSAGES],
  2759. [
  2760.   AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
  2761.     [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
  2762.        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
  2763.   if test $am_cv_val_LC_MESSAGES = yes; then
  2764.     AC_DEFINE(HAVE_LC_MESSAGES, 1,
  2765.       [Define if your <locale.h> file defines LC_MESSAGES.])
  2766.   fi
  2767. ])
  2768.  
  2769.  
  2770. dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
  2771. dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
  2772. dnl also defines GSTUFF_PKG_ERRORS on error
  2773. AC_DEFUN(PKG_CHECK_MODULES, [
  2774.   succeeded=no
  2775.  
  2776.   if test -z "$PKG_CONFIG"; then
  2777.     AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  2778.   fi
  2779.  
  2780.   if test "$PKG_CONFIG" = "no" ; then
  2781.      echo "*** The pkg-config script could not be found. Make sure it is"
  2782.      echo "*** in your path, or set the PKG_CONFIG environment variable"
  2783.      echo "*** to the full path to pkg-config."
  2784.      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  2785.   else
  2786.      PKG_CONFIG_MIN_VERSION=0.9.0
  2787.      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
  2788.         AC_MSG_CHECKING(for $2)
  2789.  
  2790.         if $PKG_CONFIG --exists "$2" ; then
  2791.             AC_MSG_RESULT(yes)
  2792.             succeeded=yes
  2793.  
  2794.             AC_MSG_CHECKING($1_CFLAGS)
  2795.             $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
  2796.             AC_MSG_RESULT($$1_CFLAGS)
  2797.  
  2798.             AC_MSG_CHECKING($1_LIBS)
  2799.             $1_LIBS=`$PKG_CONFIG --libs "$2"`
  2800.             AC_MSG_RESULT($$1_LIBS)
  2801.         else
  2802.             $1_CFLAGS=""
  2803.             $1_LIBS=""
  2804.             ## If we have a custom action on failure, don't print errors, but 
  2805.             ## do set a variable so people can do so.
  2806.             $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
  2807.             ifelse([$4], ,echo $$1_PKG_ERRORS,)
  2808.         fi
  2809.  
  2810.         AC_SUBST($1_CFLAGS)
  2811.         AC_SUBST($1_LIBS)
  2812.      else
  2813.         echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
  2814.         echo "*** See http://www.freedesktop.org/software/pkgconfig"
  2815.      fi
  2816.   fi
  2817.  
  2818.   if test $succeeded = yes; then
  2819.      ifelse([$3], , :, [$3])
  2820.   else
  2821.      ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
  2822.   fi
  2823. ])
  2824.  
  2825.  
  2826.  
  2827.